<ResourceDictionary Name="Loc" xmlns="MarkLight">
</ResourceDictionary>
<ResourceDictionary Name="Loc" xmlns="MarkLight">
<Resource Key="Greeting" Value="???" />
<Resource Key="Greeting" Language="en" Value="Hello" />
<Resource Key="Greeting" Language="sv" Value="Hej" />
<Resource Key="Greeting" Language="hi" Value="Namaste" />
<Resource Key="Greeting" Language="fa" Value="Salaam" />
</ResourceDictionary>
<LocalizationExample>
<Label Text="{@Loc.Greeting}" />
</LocalizationExample>
public void ChangeLanguageToEnglish()
{
ResourceDictionary.SetConfiguration("en");
ResourceDictionary.NotifyObservers(); // update bindings
}
<ResourceDictionary Name="Loc" xmlns="MarkLight">
<ResourceGroup Key="Greeting">
<Resource Language="en" Value="Hello" />
<Resource Language="sv" Value="Hej" />
<Resource Language="hi" Value="Namaste" />
<Resource Language="fa" Value="Salaam" />
</ResourceGroup>
</ResourceDictionary>
public void LoadResources()
{
List<Resource> resourcesFromDatabase = ... // load resources from database
foreach (var resource in resourcesFromDatabase)
{
// update existing or add new resources to a dictionary
ResourceDictionary.SetResource("MyDynamicDictionary", resource);
}
ResourceDictionary.NotifyObservers(); // update bindings
}
<ResourceDictionary Name="Loc" xmlns="MarkLight">
<Resource Key="Greeting" Language="en" Value="Hello {0} {1}!" />
</ResourceDictionary>
<FormatLocalizationExample>
<Label Text="$View.Format2({@Loc.Greeting}, {FirstName}, {LastName})" />
</FormatLocalizationExample>
Be notified when new themes, views, tutorials and updates are available