private void CreateTranslation(ICollection <string> existedLanguageName) { if (!TranslationManager.CheckLanguageName(_newLanguage)) { EditorUtility.DisplayDialog("Unable to add translation", $"Translation name can only contains A-Z, a-z, 0-9, _", "Close"); } else if (existedLanguageName.Contains(_newLanguage)) { EditorUtility.DisplayDialog("Unable to add translation", $"Translation {_newLanguage} already existed", "Close"); } else { foreach (var(_, info) in CompileConfiguration.Content.Scripts) { info.Translations.Add(_newLanguage, null); info.CreateTranslationFile(_newLanguage); } _newLanguage = ""; CompileConfiguration.Save(); AssetDatabase.Refresh(); } }