private void MultiLanguageManagerOnOnLanguageChange()
 {
     MultiLanguageManager.GetTranslateString("Red", out red);
     MultiLanguageManager.GetTranslateString("Blue", out blue);
     MultiLanguageManager.GetTranslateString("Purple", out purple);
     MultiLanguageManager.GetTranslateString("Yellow", out yellow);
     MultiLanguageManager.GetTranslateString("Orange", out orange);
     MultiLanguageManager.GetTranslateString("Brown", out brown);
     MultiLanguageManager.GetTranslateString("Green", out green);
 }
 public override void OnInspectorGUI()
 {
     base.OnInspectorGUI();
     serializedObject.Update();
     EditorGUILayout.PropertyField(_translateId);
     if (GUILayout.Button("Get Translate String", GUILayout.MinHeight(20)))
     {
         string value;
         if (MultiLanguageManager.GetTranslateString(_translateId.stringValue, out value))
         {
             _text.stringValue = value;
         }
         else
         {
         }
     }
     EditorGUILayout.PropertyField(_fontStylePreset);
     EditorGUILayout.PropertyField(_beforeSymbols);
     EditorGUILayout.PropertyField(_afterSymbols);
     serializedObject.ApplyModifiedProperties();
 }
 private void Awake()
 {
     _instance = this;
     DetectLanguage();
 }
Example #4
0
 protected void OnEnable()
 {
     _languageManager             = (MultiLanguageManager)target;
     _currentLanguage             = serializedObject.FindProperty("EditorLanguage");
     _currentLanguage.stringValue = MultiLanguageManager.CurrentLanguage;
 }