Search Unity

Question How to add a Fallback Locale

Discussion in 'Localization Tools' started by Pooperling, Oct 5, 2022.

  1. Pooperling

    Pooperling

    Joined:
    Jun 10, 2022
    Posts:
    5
  2. Pooperling

    Pooperling

    Joined:
    Jun 10, 2022
    Posts:
    5
    Here is what I see in the Locale inspector when I add some Metadata. upload_2022-10-5_14-14-35.png
     
  3. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,288
    Can you try updating to 1.3.2?
    You may need to manually edit the manifest.json file in the Packages folder to change the version.

    You just create a Locale like normal and then assign it as a fallback.
     
  4. Pooperling

    Pooperling

    Joined:
    Jun 10, 2022
    Posts:
    5
    Thank you for the answer.
    It's already 1.3.2.
    Still can't get how in the inspector can I assign a locale as a fallback. Perhaps there should be an option when pressing "+" button, but there is none, it just creates new empty element.
     
  5. BishopSJohnson

    BishopSJohnson

    Joined:
    Feb 20, 2020
    Posts:
    1
    A bit late, but in case anyone else needs the info. The metadata needs to be added to the locale asset itself. So in the Project window, navigate to the asset and add the metadata there.

    Tbh, it took me a while to figure that out myself, because honestly a lot of these menus look pretty similar so the picture makes it easy to get confused.
     
    travlake likes this.
  6. travlake

    travlake

    Joined:
    Oct 4, 2019
    Posts:
    50
    Man this is unnecessarily complicated and poorly documented. Are there any Unity websites that tell you to do this?

    Also, how often do you really want a different fallback for different locales? Should be at least an option to say use this locale as the fallback for all other locales..
     
  7. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,288
    The documentation was updated since the previous link was posted https://docs.unity3d.com/Packages/com.unity.localization@1.5/manual/Locale.html#fallbacks

    We don't have a universal fallback option but we will consider adding something in the future.

    Some users confuse fallbacks with the locale selectors which do have the option to set a universal locale(Specific Locale Selector).

    If you are looking for a way to set the startup language then use the locale selectors - https://docs.unity3d.com/Packages/com.unity.localization@1.5/manual/LocaleSelector.html
    If you are looking for a way to fallback to another locale when a translation for a particular element is missing then use fallbacks.- https://docs.unity3d.com/Packages/com.unity.localization@1.5/manual/Locale.html#fallbacks
     
    travlake likes this.
  8. travlake

    travlake

    Joined:
    Oct 4, 2019
    Posts:
    50
    Thanks! I guess it was more of a Google failure than anything else. "unity localization fallback" turns up forum results like this and this link in the documentation https://docs.unity3d.com/Packages/c...ine.Localization.Metadata.FallbackLocale.html

    Even "unit localization fallback metadata" doesn't give me the right link.

    Filtering the Localization manual for "Fallback" also didn't yield any results.
    upload_2024-1-24_10-19-46.png

    Without finding it in the manual it was not intuitive at all to add metadata to the Locale (and not the Localization settings!) as the place you'd add a fallback. If the Locales had a Fallback field (instead of needing to add metadata) it might be easier to stumble onto.
     
    karl_jones likes this.