/// ------------------------------------------------------------------------------------ /// <summary> /// Adds the specified language to the list of all language names. /// </summary> /// ------------------------------------------------------------------------------------ public void AddLanguageNames(string langName) { if (!LanguageNames.Contains(langName)) { LanguageNames.Add(langName); } }
public void AddNewLanguage() { string languageName = "English"; LanguageNames.Add(languageName); Language english = new Language(); english.WordLibrary.Add("roomsButton", "Rooms"); english.WordLibrary.Add("charactersButton", "Characters"); english.WordLibrary.Add("literatureButton", "Literature"); english.WordLibrary.Add("settingsButton", "Settings"); english.WordLibrary.Add("exitButton", "Exit"); english.WordLibrary.Add("profileSettingsButton", "Profile edit"); english.WordLibrary.Add("countRoomsPredictionAnTextBlock", "Count rooms"); english.WordLibrary.Add("countCharactersAnTextBlock", "Count characters"); Languages.Add(languageName, english); WriteFileLanguage(english, languageName); WriteFileLanguageList(LanguageNames); }