private void SetPreferences() { if (null == LanguagesListView.SelectedItem) { NavigationUtils.NavigateToScreen(typeof(MainPage)); } else { LangApplyStack.Visibility = Visibility.Collapsed; string selectedLanguage = LanguagesListView.SelectedItem as string; //Check existing lang Tuple var currentLangTuple = languageManager.GetLanguageTuple(languageManager.GetLanguageTagFromDisplayName(selectedLanguage)); SpeechSupport.Text = currentLangTuple.Item2 ? languageManager["SpeechSupportText"] : languageManager["SpeechNotSupportText"]; if (LanguageManager.GetCurrentLanguageDisplayName().Equals(selectedLanguage)) { //Do Nothing return; } //Check if selected language is part of ffu var newLang = languageManager.CheckUpdateLanguage(selectedLanguage); if (LanguageManager.GetDisplayNameFromLanguageTag(newLang.Item4).Equals(selectedLanguage)) { //Update var langReturned = languageManager.UpdateLanguage(selectedLanguage); //ffu list, Show user to restart to use the System Languages if (newLang.Item1) { Common.LangApplyRebootRequired = true; LangApplyStack.Visibility = Visibility.Visible; } //else //skip providing option to restart app } else { if (newLang.Item2) { //Stop Automatic counter to switch to next screen timer.Stop(); countdown.Stop(); ChooseDefaultLanguage.Visibility = Visibility.Collapsed; CancelButton.Visibility = Visibility.Collapsed; //If different, show the popup for confirmation PopupText2.Text = LanguageManager.GetDisplayNameFromLanguageTag(newLang.Item4); PopupYes.Content = LanguageManager.GetDisplayNameFromLanguageTag(newLang.Item4); PopupText1.Text = languageManager["LanguagePopupText1"]; PopupText3.Text = languageManager["LanguagePopupText3"]; PopupNo.Content = LanguagesListView.SelectedItem as string; double hOffset = (Window.Current.Bounds.Width) / 4; double vOffset = (Window.Current.Bounds.Height) / 2; StandardPopup.VerticalOffset = vOffset; StandardPopup.HorizontalOffset = hOffset; if (!StandardPopup.IsOpen) { StandardPopup.IsOpen = true; } } else { //Just update silently in the background and dont ask for restart app var langReturned = languageManager.UpdateLanguage(selectedLanguage); } } } }