This repository was archived by the owner on Feb 25, 2026. It is now read-only.
Repository navigation
[Feature] Markup Extension for Resource string localization #4647
HerrickSpencer
started this conversation in
Ideas
Replies: 4 comments
|
Hello, 'HerrickSpencer! Thanks for submitting a new feature request. I've automatically added a vote 👍 reaction to help get things started. Other community members can vote to help us prioritize this feature in the future! |
0 replies
|
Thanks, @HerrickSpencer! The feature seems interesting. Let's see what other community members think about this one. |
0 replies
|
I tried this method on WinUI3 (Project Reunion 0.8-rc) with Uno Platform (v2.4.0). |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Describe the problem this feature would solve
Microsoft's current documentation shows examples of how to globalize your UI facing strings in UWP/WPF XAML by using the Uid as a lookup in an included resx file. This technique works great, but does have some limitations. There is another way of using a custom markup extension to keep the UI development agile, as well as reduce globalization costs when redesigning UI.
Commonly used resources technique:
Using the markup extension:
This method reduces friction in globalization efforts and translation when there are UI redesigns. Because the developer will not be tied to a Uid, they can reuse the already translated strings in resources by referencing the string name instead. It also allows one string to be used for multiple controls without the problem of duplicating the Uid.
Describe the solution
The
ResourceStringcode example would look like this:Where it would live in the code base is with the other markup extensions
Describe alternatives you've considered
Using the Uid, but it has issues as detailed above.
Additional context & Screenshots
All reactions