Following this guide I'm trying to localize my app. I don't want to get system language. I have 3 resx files for the 3 languages that I want to support. I'm able to set the current culture at start and the strings are displayed correctly.
My goal is to change the language while you are using the app. TranslateExtension class is in MyApp.Resources PCL library and this is my page to select the language.
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:vm="clr-namespace:MyApp"
xmlns:t="clr-namespace:MyApp.Resources;assembly=MyApp.Resources"
x:Class="MyApp.Pages.LanguagePage"
BindingContext="{Binding Source={x:Static vm:App.Locator}, Path=Language}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<ListView x:Name="contactsListView" Grid.Row="0" ItemsSource="{Binding Languages}" SelectedItem="{Binding SelectedLanguage}">
<ListView.ItemTemplate>
<DataTemplate>
<TextCell Text="{Binding Value}" Detail="{Binding Key}" />
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
<Button Grid.Row="1" Text="{t:Translate Accept}" Clicked="OkButtonClicked" Command="{Binding SaveLanguageCommand}"/>
</Grid>
</ContentPage>
When a item in the ListView is selected the accept button should change the text (this is what I want). How can I do that?