Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Question Set starting locale?

Discussion in 'Localization Tools' started by User414322, Oct 23, 2023.

  1. User414322

    User414322

    Joined:
    Jul 9, 2019
    Posts:
    27
    Obvious question, but how do I make it so when I play my game in-editor, it starts as a specific language from the get-go (without having to change it in the UI gizmo post-facto).

    I have tried setting the "specific locale" to something else, but it does nothing at all, my locale always starts off English when I run the game.
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,470
    https://docs.unity3d.com/Packages/com.unity.localization@1.4/manual/LocalizationSettings.html

    So you likely want to drag the specific locale selector to the top of the list or remove the other selectors.
     
  3. User414322

    User414322

    Joined:
    Jul 9, 2019
    Posts:
    27
  4. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,470
    I can see you have the system locale selector above Chinese, this will use the system language (English it would seem). Remove it and it will work.
     
    User414322 likes this.
  5. User414322

    User414322

    Joined:
    Jul 9, 2019
    Posts:
    27
    Thank you!
     
    karl_jones likes this.
  6. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,978
    Hi @karl_jones
    Continuing above discussion, assuming i also have System and then Specific Set to chinese.
    i have added locale for Spanish "es"

    But a spanish (Venezuala) "es-VE" opens the app, what will b value of LocalizationSettings.SelectedLocale?
    Thanks
     
  7. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,470
    What do you mean by spanish (Venezuala) "es-VE" opens the app?
    What platform is this?
    Assuming this is just using the System Locale Selector the chosen locale can change depending on the platform. We start at the top and work down until we find a match.

    upload_2024-6-6_11-47-39.png


    If the System Locale Selector detects es-VE before Chinese then it should find Spanish as a natural fallback and use that. It depends on if Spanish (Venezuala) is detected before Chinese and that is dependent on how the platform is configured.
     
    jGate99 likes this.
  8. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,978
    Sorry for the misunderstanding, I'm new to localization.
    What I'm trying to say is that I set up three locales: English, Chinese, and Spanish (es). If a user's system locale is "es-VE," will the localization manager automatically choose "es"?

     
  9. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,470
    Yes it should do.
    It should detect es-VE and then look for it's fallback es.
     
    jGate99 likes this.