Hello! There is a perfect example of how localization works: How to add change language option in game
but there is a problem, I need to load the selection of the application language that I selected in the drop-down menu. How can this be done?
What do you mean you need to load the selection? Have you looked at the Samples that come with the package? We have some different menu examples.
When I start the application, the system language is loaded, for example, German. In the drop-down menu, I chose a different language. In the application, all the inscriptions were translated into the selected language. I want to remember which language I chose (for example, in PlayerPrefs). In the future, when the application is launched again, I want the previously selected language to be loaded in the application (from PlayerPrefs). I saw Samples, but I probably couldn’t figure it out until the end.
You can add the player Prefs locale selector in the localization settings. Drag it so it’s the first item and it will then remember the locale that was selected.
Thank you very much! I add the player Prefs locale selector in the localization settings. Could you explain in more detail what I need to do next?
That should be enough. Now when you change the Selectlocale it will be saved into the player prefs and this will be used when the game starts so that it starts in the same locale as before.
Unfortunately, this does not work for me. Maybe I forgot to do something else? I attach a screenshot of the settings window

You have a known bug there. We have a fix in the next version or use 2020.3 and above. Its a bug in 2019.4 only
I have updated to version 2020.3. The display of the settings window has certainly improved. Now I was able to move everything as it should be. Everything worked. Thank you very much!

I am trying to implement a menu with the ability to automatically set the application language (see the picture in the application) and the ability to manually select the application language. Now I can’t implement automatic language selection without changing the localization settings in Project Settings. Could you tell me how to load localization now, depending on the state of Toggle Automatic language?

Sounds like you may need a custom selector if you want the system language to be optional.
Create a class that Implements the IStartupLocaleSelector interface and it will then appear in the list to add to the locale selectors. You could even inherit from the existing SystemLocaleSelector and just have a flag to determine if it should be used or not.
E.G
[Serializable]
public class CustomSystemLocaleSelector : SystemLocaleSelector
{
public bool enabled;
public override Locale GetStartupLocale(ILocalesProvider availableLocales)
{
if (enabled) return base.GetStartupLocale(availableLocales);
return null;
}
}
oh yes Its not marked as virtual so you cant override it.
Ok try this
[Serializable]
public class CustomSystemLocaleSelector : IStartupLocaleSelector
{
public bool enabled;
SystemLocaleSelector m_Selector = new SystemLocaleSelector();
public Locale GetStartupLocale(ILocalesProvider availableLocales)
{
if (enabled) return m_Selector.GetStartupLocale(availableLocales);
return null;
}
}
Unfortunately, it didn’t work out again. As far as I understand, when enabled = false, I should have automatic localization installed, but this does not happen

What locale is it selecting?
I tried to choose a language with different enabled states. I launch the application and select the language that I previously set manually, regardless of the enabled state
You need to move the Player Pref selector below the CustomSystemLocaleSelector. They are queried in order.
It worked. I am very grateful to you!
I’m not a very experienced programmer, so I want to ask you to show me how to get to the CustomSystemLocaleSelector settings from the script? That is, how to change the enabled setting not from the inspector menu
You can get th list with LocalizationSettings.StartupLocaleSelectors
Then just go through it and find the one that is the type you are looking for.
