How to add a new entry in localization tables by Script?
I am able to create a new StringTableEntry but I can't save the value of the text, I tried with
var table = LocalizationSettings.StringDatabase.GetTable("MyTable",LocalizationSettings.SelectedLocale);
table.AddEntry(key,message);
the entry is created, but the text isn't saved maybe i am getting the wrong localized data table?
i am using Unity 2019.4.28f1 on ArchLinux Localization 1.0.0-pre.9
Answer by karl_jones · Jul 20, 2021 at 07:56 AM
You need to call EditorUtility.SetDirty on the table and the Shared Table Data as they are both assets.
EditorUtility.SetDirty(table);
EditorUtility.SetDirty(table.SharedData);
Your answer
Follow this Question
Related Questions
Localization Unity Tutorial NullReferenceException 0 Answers
Why can't SmartString use array? 1 Answer
Any know where I can find information on how to localize my Asset Offering? 0 Answers
Localization Playerprefs remember language on startup 1 Answer
Localization works perfectly in editor, but doesnt work at all in build. 2 Answers