Creating a mobile application is an opportunity to reach out to the whole world; no barriers! This means that you will want to talk to your users' language, so you need a way to globalize your application.
Xamarin.Forms uses a built-in mechanism for localizing .NET
applications. You can use RESX files, add your strings for each language code, and depending on the system language settings your application will load the appropriate value.
This is feasible in code and from XAML pages. In this recipe, we will explore the two options and present the string value Hello World! in English, and in French Bonjour le monde!.
Start by opening Visual Studio and creating a cross-platform solution, File | New | Project…, choose Blank App (Xamarin.Forms Portable) from the templates, name it
XamFormsLocalization
, and click OK.Create a default RESX file and a French RESX file in the portable library, right-click and Add | New Item…, from the templates choose
Resources
File, name...