By default, the current language is automatically obtained, based on the settings of the operating system. However, sometimes you may need to programmatically force the current language, for instance, to allow a user to use an application in more than one language, which could be switched according to the user's needs. In this recipe, you will learn how to force the current language within the application.
To add translations in another language and force the language to Polish in the application, you should perform the following steps:
Translate the content to the Polish language. To do so, refer to the following steps:
Add the
pl-PL
folder to theStrings
folder.Add the
Resources.resw
file to thepl-PL
folder.Provide the values in the
Resources.resw
file, as follows:
Force the current language to Polish by modifying the body of the
OnLaunched
method in theApp...