Search Unity

Group assets and string tables by locale in addressable groups

Discussion in 'Localization Tools' started by djeedai, Sep 13, 2020.

  1. djeedai

    djeedai

    Joined:
    Sep 28, 2018
    Posts:
    6
    Hi,

    I just started using Addressables and Localization, so I may be missing something basic here, but it seems the default setup creates 3 addressable groups:
    - Localization-Locales
    - Localization-Assets-Shared
    - Localization-StringTables

    upload_2020-9-13_11-21-56.png

    However my understanding is that one would use addressable groups to allow lazy/conditional loading, that is in the case of localization to only download the locale(s) of interest (e.g. if the user never uses anything else than English, there is no point downloading assets and string tables for those 30 other locales the app supports...). Unfortunately with the above setup asset/string table are grouped by kind and each group contain items for all locales, instead of the more intuitive grouping by locale with most/all localization items for a single locale.

    1. Should the default group(s) be changed to group by locale instead of localization item kind? It seems the current grouping completely defeats the purpose of addressables.
    2. How to workaround the fact they're currently not? It seems the groups are grayed out and cannot be changed. Has anyone tried to reorganize the localization items into different groups?

    Thanks
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,297
    Hey. We do this now with assets however tables are stored in the same group at the moment. That said there's no reason for this and you can actually move them into other groups. Allowing more control over the Addressables grouping is something we will be adding in the future.
    We do set the group's as read-only which is why they are grayed out, I believe you can still edit some parts such as moving the assets.
    However you should not change the name of the asset or its labels, that will likely break things if you do.
     
    djeedai likes this.
  3. djeedai

    djeedai

    Joined:
    Sep 28, 2018
    Posts:
    6
    Thanks for the quick reply @karl_jones!

    I confirm I tried and you can move tables away to another group, but not back since the group is read-only. It doesn't seem to break anything so far.

    Just to make sure I understand, as I am not familiar with this package nor the Addressables one, you are saying there's no particular limitation and I can move the string tables into any addressables group I create myself, but at the same time by default they're in an auto-created group that's set to read-only? Is that a legacy setup then, that used to be rigid but has not yet been updated despite the code handling more flexible configurations? Why are those group read-only if the package doesn't mind tables and assets being moved to other groups? Can I delete the default groups?

    I did something like that and it seems to work:
    - localization for mandatory bits.
    - locale-specific groups for localized strings; user likely will not use all of them.

    upload_2020-9-13_20-1-39.png
     
  4. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,297
    Yes, we were more rigid with the Addressables set up earlier. You should be ok to move them however if we need to internally make an Addressable change you may find the items move back into the old groups as we don't fully support custom groups at the moment, we just expect things to be in certain groups.

    I would still recommend keeping the Locales in their default group as you will need to load them in order to show the available languages and if you place them into language-specific groups with their tables and assets then you will pull those groups just to get the Locale info. You can always add extra locales at a later date as part of a language pack, you would just need to inform the Addressables system so it has the correct manifest.

    We do plan on adding some samples in the future to show how this could be done to support modding etc.
     
  5. Eco-Editor

    Eco-Editor

    Joined:
    Jun 29, 2016
    Posts:
    71
    Hi @karl_jones,

    I'm working on populating the asset table created for several languages, as the example show here:


    for some reason this is how it looks on my end:
    upload_2021-10-13_13-51-54.png

    I've created the Key Country Flag and want to populate with texture assets, however instead of texture assets, it allows me to populate it with the asset object of each language.

    Can you please advise how to solve this, or refer me to the correct materials.

    I tried to follow this information: https://docs.unity3d.com/Packages/com.unity.localization@0.2/manual/index.html
    and this: https://docs.unity3d.com/Packages/com.unity.localization@1.0/manual/AssetTables.html

    Thank you
     
  6. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,297
    Did you drag the asset tables into the field? Try deleting the Country Flag row and adding it again. You should be able to drag any asset type into the slot, the first asset that gets added determines the asset that they must all be.
     
  7. Eco-Editor

    Eco-Editor

    Joined:
    Jun 29, 2016
    Posts:
    71
    karl_jones likes this.