-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Windows image localization papercut #16755
Copy link
Copy link
Open
Labels
area-localizationLocalization and globalization issuesLocalization and globalization issuesarea-single-projectSplash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, ResizetizerSplash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, Resizetizeri/great-reporterThis issue is opened by an author who is known to open high-quality issuesThis issue is opened by an author who is known to open high-quality issuesplatform/windowss/needs-attentionIssue has more information and needs another lookIssue has more information and needs another looks/triagedIssue has been reviewedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't working
Milestone
Metadata
Metadata
Assignees
Labels
area-localizationLocalization and globalization issuesLocalization and globalization issuesarea-single-projectSplash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, ResizetizerSplash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, Resizetizeri/great-reporterThis issue is opened by an author who is known to open high-quality issuesThis issue is opened by an author who is known to open high-quality issuesplatform/windowss/needs-attentionIssue has more information and needs another lookIssue has more information and needs another looks/triagedIssue has been reviewedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't working
Type
Fields
Give feedbackNo fields configured for issues without a type.
Description
In a .NET MAUI app you can follow the .NET Android approach to handling localized images and it works correctly. On iOS/MacCat you can follow the platform approach to handling localized images and it works with a workaround (see #16734).
Windows is equally mysterious. If you place your localized images, in locale folders, in the root of your MAUI project then image localization works:
This isn't great though. But placing them in Platform/Windows doesn't work:
Similarly, placing them in Platform/Windows/Assets/Images doesn't work, which I'd hoped would work due to it being the UWP approach.
However, it's possible to make it work. Place your localized images in Platforms/Windows/Assets/Images (or whatever you want to call your images folder):
Those images will get copied to
bin/.../win10-x64/AppX/Platforms/Windows/Assets/Images, which means to retrieve them in XAML you'll need to specify the path:So while this works I'd label it a papercut because the behaviour on one platform is different to the other platforms, where you don't have to worry about the path to the images.
Version with bug
7.0.92
Is this a regression from previous behavior?
No, this is something new
Affected platforms
Windows