Open mrlacey opened 1 year ago
Thank @mrlacey for this great tool ! what if in plus of dark and light setting we allow also to select a language in a combobox listing resources files . Once a new project is created the tool allow user to select as many resources files as needed and one default localization?
Thank @mrlacey for this great tool ! what if in plus of dark and light setting we allow also to select a language in a combobox listing resources files . Once a new project is created the tool allow user to select as many resources files as needed and one default localization?
It feels like there are several things all connected here:
The first point could be entirely separate from a settings page and would provide additional value by adding the iOS, macOS, and Windows-specific config too.
The second point is much more complicated:
Thanks for your quick feedback it's indeed more challenging than I thought but Here are some food for thought
Should this always be included on a settings page?
No I don't think this option wont be relvant for many people, we may added a checkbox to include this option or not on setting page the combobox and additionnal resources files on the project.
How should the language changes be applied? (There are multiple possible ways of doing this--which one to use?)
The language change would be idealy changed at run time and use default Microsoft Localization library to avoid be dependent to any pluggin that may not be maintened in future.
Would it matter if this option existed but the rest of the default content in the app wasn't localized?
Also its users resposability to do the Localization process by doing whats needed in the XAML and resources files to ensure all there containt are handled. At project creation we may just do it on the few string already availble at project creation.
If it should be provided as localized, in which languages?
By default english as it'is already the case today and during the project creation we got a menu to added as many resources files as needed (like you do for creating additionnal pages in the shell menu) but still user responsability to feed those resources files and naming them consistenly with the targeted localization.
How will the translations of current content be done? (& paid for?)
User responsability to do it we just help with the menu in setting, addition of resources fils to the project and a default mecanism to load the resources files. and by default all resources files will contain english string alredy provieded
How should these translations be supported/maintained?
Still user responsability we just provied empty resources files or may be all containing english string and leave each individual do the translation work
What about the massive maintenance overhead that having to support localized content will add? (You think new releases and updates are slow now, just imagine how much worse they would be if everything in the generated app had to be translated prior to release.).
Same as previously we are just adding a default mecanism and adding resources files again with default string.
Would it be necessary to also support RTL languages?
that the most challenging part to be honest have never do that and it seem to have a big impact n the app layout and the XAML seem to be quiet specific, sorry for this I have no Idea currently I have to think more...
Thank you again for your work, please don't take wishs of happy users of your tools as command . I was really thrilled by this project from the begining and even it's too complicated to added will still be very happy and greatful to start my project with this fantastic tool.
To avoid this getting too far off the topic of a Settings Page, I've created a separate issue for adding the ability to include a different resource files in the generated app
For other points related to what the addition to the settings page would mean and to clarify some of the above:
The language change would be idealy changed at run time and use default Microsoft Localization library to avoid be dependent to any pluggin that may not be maintened in future.
What do you mean by the "default Microsoft Localization library"? In the example Localization page created via the wizard, it currently shows 3 different ways of localizing the text that is shown in the UI (As a resource, via a markup extension, and via binding) which of these should be used in the generated app? For a feature that only one person has asked for (so far) I'm loath to triple the work involved in creating three different versions and having the user select which one they want.
So that I'm clear from your comments above, you're not advocating for also changing all the pages that can currently be generated in a new app and making all their content (text) localized. I hope that's the case. (It's a lot less work to not have to change everything that already exists.) It would mean populating the resource files with lots of content that I'd expect most people to have (want?) to delete from the generated app.
Before attempting to implement a solution to change the language at runtime, note also the warning at https://learn.microsoft.com/en-us/dotnet/maui/fundamentals/localization?view=net-maui-8.0#test-localization
... your app loads the appropriate localized resources on a per-thread basis, based on the culture specified by the CurrentUICulture property. Warning While it's possible to set the value of CurrentUICulture in code, the resulting behavior is inconsistent across platforms so this isn't recommended ...
While other solutions to localizing content do exist, I'm not clear which is the best or most appropriate to include as a default/recommended solution.
Add an option for a settings page. This should include: