Пример #1
0
        void ChangeLanguage()
        {
            File = Localization.StringsByFile.Select(o => o.Key).ToArray()[0];
            Text label = GetComponent <Text>();

            label.text = Localization.GetFromFile(File, Key, label.text);
        }
Пример #2
0
        // Use this for initialization

        void Start()
        {
            Localization = LanguageService.Instance;
            Language     = Localization.Language.Name;
            File         = Localization.StringsByFile.Select(o => o.Key).ToArray()[0];
            Text label = GetComponent <Text>();

            label.text = Localization.GetFromFile(File, Key, label.text);
            LanguageInfo.SubPubSystem.Subscribe("Language", ChangeLanguage);
        }
Пример #3
0
 public void UpdateText(string Key)
 {
     this.Key   = Key;
     label.text = Localization.GetFromFile(File, Key, label.text);
 }
Пример #4
0
 void Start()
 {
     Localization = LanguageService.Instance;
     label        = GetComponent <Text>();
     label.text   = Localization.GetFromFile(File, Key, label.text);
 }