maui-localization
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "maui-localization" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-52b29f212c2ef9d194ffd73681f1fc59eacc07f4c2216987c0b44f9d55dde05b. Verify the upstream source and version against https://github.com/davidortinau/maui-skills before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Localization guidance for .NET MAUI apps focused on using .resx resources for multilingual support, culture resolution and runtime switching, RTL layout, platform language declarations (e.g. Info.plist for iOS/Mac Catalyst, Package.appxmanifest for Windows), and image localization strategies.
Introduction source: third_party · davidortinau · 0.0.1 Reference
SkillPi interpretation
- Testing
- Not tested
Browse files
Frontmatter
name: maui-localization
description: >-
Guidance for localizing .NET MAUI apps: multi-language support via .resx resource files,
culture resolution and runtime switching, RTL layout, platform language declarations
(iOS/Mac Catalyst Info.plist, Windows Package.appxmanifest), and image localization strategies.
USE FOR: "localization", "multi-language", "resx resource", "translate app", "RTL layout",
"culture switching", "localize strings", "right-to-left", "language support MAUI",
"Info.plist languages".
DO NOT USE FOR: theming or visual styles (use maui-theming), accessibility labels
(use maui-accessibility), or content from REST APIs (use maui-rest-api)..NET MAUI Localization
Common gotchas
| Issue | Fix |
|---|---|
ResourceManager returns null for default culture |
Set <NeutralLanguage>en-US</NeutralLanguage> in .csproj |
| iOS ignores culture overrides | CFBundleLocalizations missing from Info.plist |
| Windows doesn't show correct language | <Resource Language="..." /> missing from Package.appxmanifest |
x:Static bindings don't update on language switch |
x:Static is one-time — use binding approach with INotifyPropertyChanged |
.Designer.cs not regenerating in VS Code |
Add <CoreCompileDependsOn>PrepareResources;$(CoreCompileDependsOn)</CoreCompileDependsOn> and run dotnet build |
⚠️ NeutralLanguage is mandatory
<!-- ✅ Always set in .csproj -->
<PropertyGroup>
<NeutralLanguage>en-US</NeutralLanguage>
</PropertyGroup>
<!-- ❌ Missing this causes ResourceManager to return null at runtime -->
Platform declarations — don't forget these
iOS / Mac Catalyst
⚠️ Without this, iOS won't offer your app's languages in system Settings:
<!-- Platforms/iOS/Info.plist AND Platforms/MacCatalyst/Info.plist -->
<key>CFBundleLocalizations</key>
<array>
<string>en</string>
<string>es</string>
<string>fr</string>
</array>
Windows
<!-- Platforms/Windows/Package.appxmanifest -->
<Resources>
<Resource Language="en-US" />
<Resource Language="es" />
<Resource Language="fr-FR" />
</Resources>
Android
Android picks up .resx-based localization automatically. No additional manifest entries required. ✅
Runtime language switching — x:Static trap
<!-- ❌ Won't update when language changes at runtime -->
<Label Text="{x:Static resx:AppResources.WelcomeMessage}" />
<!-- ✅ Updates dynamically via INotifyPropertyChanged -->
<Label Text="{Binding [WelcomeMessage], Source={x:Static local:LocalizationResourceManager.Instance}}" />
When switching culture, set all three properties or formatting is inconsistent:
// ✅ Complete culture switch
var culture = new CultureInfo("es");
CultureInfo.CurrentUICulture = culture; // resource lookup
CultureInfo.CurrentCulture = culture; // dates/numbers
AppResources.Culture = culture; // ResourceManager
// ❌ Only sets UI culture — dates/numbers stay in old culture
CultureInfo.CurrentUICulture = new CultureInfo("es");
RTL layout — set FlowDirection at page level
<!-- ✅ Page-level — children inherit -->
<ContentPage FlowDirection="RightToLeft">
<StackLayout FlowDirection="MatchParent" />
</ContentPage>
<!-- ❌ Only on child — parent still LTR, layout breaks -->
<ContentPage>
<StackLayout FlowDirection="RightToLeft" />
</ContentPage>
VS Code pitfall
⚠️ .Designer.cs may not regenerate on save. Add to .csproj and run dotnet build after .resx changes:
<CoreCompileDependsOn>PrepareResources;$(CoreCompileDependsOn)</CoreCompileDependsOn>
Decision framework
| Need | Approach |
|---|---|
| Static multilingual strings | .resx files with x:Static bindings |
| Runtime language switching | LocalizationResourceManager with INotifyPropertyChanged bindings |
| Culture-specific images | Name images banner_{culture}.png or store paths in .resx |
| RTL support | Set FlowDirection at page level, detect with TextInfo.IsRightToLeft |
| Date/number formatting | Set CultureInfo.CurrentCulture alongside CurrentUICulture |
Quick checklist
- [ ]
NeutralLanguageset in.csproj - [ ] Default
AppResources.resxcontains all keys - [ ] Each target language has its own
AppResources.{culture}.resx - [ ] iOS/Mac:
CFBundleLocalizationslists all supported languages - [ ] Windows:
Package.appxmanifestdeclares<Resource Language="..." /> - [ ] RTL cultures set
FlowDirectionat page/app level - [ ] Runtime switching sets all three:
CurrentUICulture,CurrentCulture,AppResources.Culture - [ ]
dotnet buildregenerates.Designer.csafter.resxchanges
Current listing version
0.0.1
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 提供 .NET MAUI 应用本地化的完整指南,涵盖多语言支持、文化区域解析、运行时切换、RTL 布局、平台语言声明和图像本地化策略
- 内容实用性强,针对开发者常见痛点提供具体解决方案和最佳实践
Highlights
- 触发词精准完整,覆盖多种变体,边界清晰
- 明确区分适用与不适用场景,避免误用
Highlights
- 结构清晰,包含常见问题、平台声明、运行时切换、RTL 布局、VS Code 陷阱、决策框架和快速检查清单
- 提供端到端示例和具体代码片段,便于理解和实施
Highlights
- 工具来源明确,参数正确,覆盖主要异常
- 提供完整的文化切换示例和平台特定配置,确保执行可靠性
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.