I am working on a C# WinForms application. With the idea of moving the application to ASP.NET in the future, the solutions has 2 projects;
- Class Library project with a data access class and a folder "Model" with a file per class/model.
- Windows Forms App project with all the forms, user controls and their logic.
New with localization, I read this article by Microsoft. According to their first step of "Localization Best Practices", it is advised to move all localizable resources to separate resource-only DLLs.
Because I already have a Class Library project (project 1) in my solution, I added a new folder "Localization" and created a two resource files "Strings.resx" and "Strings.en.resx". (The default language is in Dutch.)
To test this recommended setup, I cleared the text property of one of the buttons on the main form to replace it with a value from the resource file I've created. But I can't figure out how to connect the value of the resource file to the text property.
I found this post where is all has been done programmatically, but I am not sure if this is the only/best approach. And how do I notify the ResourceManager about the resource files in an other project (in the same solution). And do you still need to set the Localizable property of the form to True, when not using resource files per form, as per default?
Any help to send me in the right direction is welcome!