microsoft / WinUI-Gallery

This app demonstrates the controls available in WinUI and the Fluent Design System.
MIT License
2.81k stars 628 forks source link

Is there i18n support? #787

Open ghost opened 3 years ago

ghost commented 3 years ago

My English is very poor, can Xaml-Controls-Gallery support i18n like Flutter Gallery?

marcelwgn commented 3 years ago

As of right now, there is no i18n support yet, however this is something that could be added. @stmoy thoughts maybe?

stmoy commented 3 years ago

This is a very interesting idea! I suspect this would have two parts:

  1. Add the architecture to support i18n
  2. Over time, add translations

Although I think this is generally a good idea to explore, I'm honestly not too familiar with how difficult it would be to add. I'd imagine it would require moving all the text to resource files and loading them in dynamically?

I also wonder if the mechanisms required to do this would be different between the WinUI2/UWP version and the WinUI3 version?

TL;DR - I think this is a good idea, I just don't have enough knowledge to know what it entails.

CC: @gregwoo-microsoft

marcelwgn commented 3 years ago

@stmoy You are correct in assuming that this would require moving the text into resource files. Since we would want to probably localize everything, this would mean, having to touch every sample page and move the text into resource files. Regarding UWP&WinUI 2 vs WinUI 3, those should work the same way so not much work would be needed to port it to one version to the other version.

gregwoo-microsoft commented 3 years ago

Thank you for bringing this up @xiao-cao-x . This is a great idea. I'll do more research on how we can implement it in the future.

gregwoo-microsoft commented 2 years ago

Just want to give you a quick update: this idea is in the backlog but is not a top priority right now. Rest assured that we will do our best to implement it in the future. Will update this thread if there is progress.