Advertisement
Intermediate .NET MAUI, Advanced & Enterprise

How do you implement localization (multi-language) in MAUI?

Short answer

Use .resx resource files (AppResources.resx plus AppResources. .resx), access strings via the generated resource class, and set Thread.CurrentThread.CurrentUICulture. Bind UI text to a localization helper or use a markup extension. For RTL, set FlowDirection.

Save .NET MAUI mock interview
Advertisement
AModel answer
Use .resx resource files (AppResources.resx plus AppResources.<culture>.resx), access strings via the generated resource class, and set Thread.CurrentThread.CurrentUICulture. Bind UI text to a localization helper or use a markup extension. For RTL, set FlowDirection. Format dates/numbers with the current culture.
// Strings.fr.resx provides French; select at runtime
CultureInfo.CurrentUICulture = new CultureInfo("fr");
label.Text = AppResources.WelcomeMessage;
Real-world example
An app ships English and French, switching all UI strings when the user changes language in settings.
Likely follow-ups
  • How do you handle RTL layouts? | Where are localized strings stored?
Related topics