Search Unity

Question Changing locale with remote addressables

Discussion in 'Localization Tools' started by BoopShadoop, Jan 31, 2023.

  1. BoopShadoop

    BoopShadoop

    Joined:
    Apr 6, 2021
    Posts:
    9
    Hello,

    We are using remote addressables for the localization.
    As far as I understand, only the currently used locale tables are downloaded.

    So I have 2 questions:
    1. Is the locale downloaded when setting LocalizationSettings.SelectedLocale?
    2. When a player changes the locale from the game settings, I would like to show a loading wheel while the locale tables are being downloaded and set, how can I know when the operation is complete? Or if an error has occurred when trying to download the locale tables? I tried using LocalizationSettings.SelectedLocaleAsync but it seems to return immediately.

    Thank you!
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,300
    1) The table will be downloaded during the selected locale if it's marked as preload, otherwise it will be downloaded when it's first requested.
    2 ) Try using LocalizationSettings.InitializationOperation to see the status.
     
    BoopShadoop likes this.
  3. BoopShadoop

    BoopShadoop

    Joined:
    Apr 6, 2021
    Posts:
    9
    Awesome! It seems to be working now, thank you :)
    Regarding the preloading, is there a way to download the table without necessarily loading it into the memory?
     
  4. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,300
    BoopShadoop likes this.
  5. BoopShadoop

    BoopShadoop

    Joined:
    Apr 6, 2021
    Posts:
    9
    Unfortunately it seems that LocalizationSettings.InitializationOperation still completes with status
    Succeeded when I disconnect the network, so when the table fails to download - it doesn't indicate it. Is there a way to know if it failed?
     
  6. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,300
    BoopShadoop likes this.