I’m trying to localize 2 texts (textMeshPro) from a script, but one get the selected locale, the other not.
I’m using 2 different path to get the 2 localized strings.
// trying to cache for later use ?
void Awake()
{
localizedString = new LocalizedString { TableReference = "table 1", TableEntryReference = "key A" };
stringTable = LocalizationSettings.StringDatabase.GetTable("table 2");
}
// happen later
void SetText()
{
tmp_1.text = localizedString.GetLocalizedString();
tmp_2.text = stringTable.GetEntry("key B").GetLocalizedString();
}
when using SetText() the localizedString path is updated to the current locale.
However the string table is not updated to the current locale.
Do I have to manually set the locale for each table before using the .GetLocalizedString() ?