What problem does it solve?
Localizing .NET MAUI apps can be error-prone across platforms due to inconsistent culture resolution, missing neutral language declarations, and platform-specific localization declarations. This guide provides structured practices to implement robust multilingual support, ensuring consistent behavior for end users.
Core Features & Use Cases
- NeutralLanguage and resource management: Always declare a neutral language in the .csproj and organize AppResources.resx files per culture.
- Platform declarations: Add CFBundleLocalizations for iOS/Mac Catalyst and Resource entries in Windows Package.appxmanifest to expose supported languages to the system.
- Runtime language switching: Coordinate CultureInfo.CurrentUICulture, CultureInfo.CurrentCulture, and AppResources.Culture for seamless dynamic language changes.
- RTL and layout: Apply FlowDirection at page or app level to support right-to-left languages across screens.
- Image localization and VS Code pitfalls: Use culture-specific images or resources and ensure designer-generated code regenerates after resx changes.
Quick Start
Set NeutralLanguage in your MAUI project file, declare supported languages in platform manifests, and enable runtime culture switching in your app resources.