I am creating windows phone app 8.1 in SilverLight with Visual Studio 2015. I am creating multi language app in English and Arabic. For that I have created Strings folder in the project with two folder of en-US and ar-KW with Resources.resw file in each folder.
I am x:Uid setting properties. For example Key:- Actual.Text Value:- Actual
<TextBlock x:Uid="Actual" TextWrapping="Wrap" MaxWidth="65" HorizontalAlignment="Center" />
Above is working very good. I have combobox with Item EN and AR. I am triggering SelectionChanged event to change the Language But the issue is when I stop the app and run it again than only it change the text and layout.
How can I do it at runtime without restart.
private void LanguageComboBoxName_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
string selectedItem = (e.AddedItems[0] as ComboBoxItem).Content as string;
var RootFrame = Window.Current.Content as SlideApplicationFrame;
if (selectedItem == "EN")
ApplicationLanguages.PrimaryLanguageOverride = "en-US";
else if (selectedItem == "AR")
ApplicationLanguages.PrimaryLanguageOverride = "ar-KW";
RootFrame.Navigate(this.GetType());
}