public static void SetText(this NK_TextMeshProUGUI text, string localizeKey, string value) { if (!LocalizationManager.instance.ContainsKey(localizeKey)) { LocalizationManager.instance.textTable.Add(localizeKey, value); } text.localizeKey = localizeKey; text.LocalizeTextAsync(); }
public static void SetText(this NK_TextMeshProUGUI text, string localizeKey, string value) { var localMgr = Game.instance.GetLocalizationManager(); if (!localMgr.ContainsKey(localizeKey)) { localMgr.textTable.Add(localizeKey, value); } text.localizeKey = localizeKey; //text.LocalizeTextAsync(); // broken in update 27.0. Not sure what to do to fix it }
public static string GetText(this NK_TextMeshProUGUI text) => LocalizationManager.instance.textTable[text.localizeKey];