Localizing Forms Using WinRes
I've just ran into a really helpful localization tool, which is part of the .Net SDK.
What is it?
It is called "Windows Resource Localization Editor".
It lets you open resx files, that are form related. This means that you won't be able to open regular resource files (that you've added yourself) but only ones that are automatically generated by the Visual Studio designer.
Where can I find it?
On VS2005, I found the file on
%programfiles%\Microsoft Visual Studio 8\SDK\v2.0\Bin\WinRes.exe.
On VS2008, there is an SDK folder on you start menu and it lies there.
If you still don't find it, just look for WinRes.exe on your computer.
Example of use
Firstly, we'll create a localizable form...
Sample steps to generate a localizable form:
- Open VS.
- Create a new "Windows Application"
- On the form's properties, set the Localizable property value to True.
That's it, now we have a localizable form.
Now open WinRes...
- Click on File->Open...
- Browse to the new windows application folder and locate the form's resx file.
- Click Open.
- Now you have your form, with its UI related properties (no IDs can be changed).
- Change your text and labels to some other language and click save. When you click save, you'll be able to choose the language of the current state of your form.
After you click save, a new resx file will be added and users that have this language as their Windows default language will see the form in their preferred language.
Sample project: LocalizationSampleProject.zip (54.50 kb)
Screenshots
All the best,
Shay.