Search Unity

Question Localization works in editor but not when built to device

Discussion in 'Localization Tools' started by imjusthere, Feb 24, 2021.

  1. imjusthere

    imjusthere

    Joined:
    Oct 12, 2012
    Posts:
    72
    My default language is set to English. When I test in the editor it sets the text to English properly. I can also select the languages from the dropdown menu and that works fine too. However when I build it to the device it doesn't set the language to English and I get the following error:

    No Locale could be selected:
    02-24 14:15:38.548 3115 3145 E Unity : No Locales were available. Did you build the Addressables?
    02-24 14:15:38.548 3115 3145 E Unity : The following (3) IStartupLocaleSelectors were used:
    02-24 14:15:38.548 3115 3145 E Unity : UnityEngine.Localization.Settings.CommandLineLocaleSelector
    02-24 14:15:38.548 3115 3145 E Unity : UnityEngine.Localization.Settings.SystemLocaleSelector
    02-24 14:15:38.548 3115 3145 E Unity : UnityEngine.Localization.Settings.SpecificLocaleSelector

    I have built the addressables.

    I copied the table from another project. The project it is copied from works perfectly. It's got dozens of languages in it so I didn't want to have to copy/paste them into a new table. Would this cause an issue and if so how do I fix it?
     
  2. Depends on the version you're using, there was this relatively recently, but I think they fixed it in the latest, although I haven't tested it yet.
    https://forum.unity.com/threads/reusing-settings-and-tables-in-new-project.1043251/
     
  3. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,282
  4. imjusthere

    imjusthere

    Joined:
    Oct 12, 2012
    Posts:
    72
    Instead of copying only the localization table I copied the whole project. Then made the changes I needed to that and now it works fine.
     
    karl_jones likes this.
  5. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,282
    Did you only copy the table last time?
    You need to copy the table collection, shared table data and the tables. The simplest thing is to select the table collection asset and export it as a package. The table on its own won't work.