Reputation: 155
I've started using Localization with resource files in my application. I'm using Visual Studio 2022 17.11 (the one with the new Resource Explorer) I'm facing some problems and here's a brief list:
Every time I add a new language (by selecting it from the drop down list of the Form), all new resources are added to the Resources Explorer, even Location, Size, Name and other properties like TabIndex and stuff. The thing is, I want to translate only the Text or Label , not the entire location and position of the control. Every time I change something in design view, I have to remember to change its position/size/.. in every language and this is soooo frustrating.
I see a lot of empty red fields in the new Resource Explorer. Sometimes when I save the solution, a bunch of error starts to pop-up, so I have to restart visual studio, delete .vs hidden folder inside solution folder and recreate the resource files.
I think I would like to switch to a more practical Globalization solution other than Resource Files. I have to maintain 3 or 4 languages in my applications, and it's so frustrating.
Any ideas? Thank you!
Upvotes: 0
Views: 221
Reputation: 565
There are two very effective and easy ways to work with globalization in WinForms. The first that I will recommend is the i18n.NET library, which allows you to avoid direct interaction with RESX files, a significant advantage. This is more suitable for smaller or newly started projects
In the case of legacy projects (the majority of WinForms projects), the most viable alternative is the tool ResXManager. This tool assists with all the controls, making the updating and maintenance of translations much easier.
Upvotes: 0