Adding localization

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!.

How to do it…

  1. Start by opening Visual Studio and creating a cross-platform solution, File | New | Project…, choose ...

Get Xamarin: Cross-Platform Mobile Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.