Fallback on LocalizationSettings.StringDatabase.GetLocalizedString

Hello.
For example, I have a korean smartphone with korean language set by default. My game is translated to english, russian and spanish with the build-in localization package 1.3.2.

I check the selected locale at startup with LocalizationSettings.SelectedLocale. And if it is different from English, Russian or Spanish, I manually set the selectedLocale to English:

LocalizationSettings.SelectedLocale != LocalizationSettings.AvailableLocales.Locales[0]

Then I get all the text set to english, all right. BUT. If I try to set text by code, like this:

string inventoryText = LocalizationSettings.StringDatabase.GetLocalizedString("Inventory", "text2");

And my system’s locale is different from RU, EN or ESP, I get just blank text. I have tried to specify the fallback behaviour, by adding this to the line:

string inventoryText = LocalizationSettings.StringDatabase.GetLocalizedString("Inventory", "text2", LocalizationSettings.AvailableLocales.Locales[0]);

But no use, still blank text.

Have you tried setting up locale fallbacks?
https://docs.unity3d.com/Packages/com.unity.localization@1.4/manual/Locale.html#fallbacks

If the system has a language you don’t support then it will go through the locale selectors until it finds one that works, usually the final specific locale selector
https://docs.unity3d.com/Packages/com.unity.localization@1.4/manual/LocalizationSettings.html#locale-selector

I solved the problem by adding all possible locales to the project and manually changing their fallback settings to english one-by-one (except for russian and spanish ones that have their own translation).
Still it makes me wonder why I couldn’t just specify the english locale as default fallback in every possible scenario. This whole case seems to me poorly designed. Why does static text fallback work like charm, whilst code-called doesn’t work without calling the ancient gods?

You should not need to do that, just setting the specific locale to English in the locale selectors would do the same.

Sounds like the issue is in your code. What does it look like?