Some strings could also be set programmatically from code-behind files. To prepare a localized application, it is also necessary to translate them and present in the current language. In this recipe, you will learn how to use the ResourceLoader
class to programmatically get localized content.
To prepare an example that shows how to localize content programmatically, you need to perform the following steps:
Handle the event of clicking on the Submit button by modifying the
MainPage.xaml
file as follows:<Page (...)> <ScrollViewer> <StackPanel Padding="20"> (...) <Button x:Uid="BtnEntrySubmit" HorizontalAlignment="Stretch" Padding="10" Margin...