First, you need to perform
globalization. First of all, it means that you put all your constants (including immediate constants hard-coded in the code; ideally, you should not have them at all) in *.resx resources. Besides, all your form layout should be automated to be adjusted to sizes of all the strings during run time. It requires thorough size-tolerant design: no absolute positioning/sizing, ever, using of the properties
Dock
and
Padding
for all elements of design, and so on. You can test it by seeding random text into the resources.
More difficult problem would be automatic change in layout when you switch from left-to-right to right-to-left, because this is Arabic. Please look at the control class and study all the
*RightToLeft
and
Rtl*
members:
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.aspx[
^].
This is not so simple, because this is not just about the direction of the text. For example, if in Western culture you can have labels on left and labelled controls on right, in Arabic window it should be the opposite (it I'm not much mistaken, as far as I remember how Arabic pages look).
When this works and tested, you can get to
localization, which should be easier if globalization part is perfectly implemented and tested. .NET provide a powerful mechanism based on
satellite assemblies. Basically, it looks like this: you pass only the resource files to the translators; and they don't even need Visual Studio (because MSBuild is provided as a part of .NET Framework and quite enough for the build); the perform translation compile resources to create some resource-only assemblies called
satellite assemblies, all in one-to-one correspondence with original resources. They don't have to translate everything, as there is a fallback mechanism: if a resource not found, a resource from the closest culture will be user, all the way down to original resources of your product.
When this is done, you simply put the new assemblies in the sub-directories named after the culture IDs. The framework will automatically find and load resources when they are needed, depending on the current UI culture of the main (UI) thread of the application. The main code of the product never needs to be re-compiled. The translation teem never needs the full source code. They are given only the part with resources and, of course, appropriate number of copies of the fully functional original product with detailed documentation.
There can be different scenarios for switching the cultures. Ultimately, it can be switched right during runtime. As soon as it happens, the resources are loaded automatically. Please see how to do it:
http://msdn.microsoft.com/en-us/library/system.threading.thread.currentuiculture.aspx[
^].
In other scenarios, the culture could be prescribed in application configuration file or installed by an installation process. There is also a mechanism for querying resources for required culture from the deployment Web site and automatically downloading them if the resource for a required culture are available.
For further reading, please see:
http://msdn.microsoft.com/en-us/library/aa292205%28v=vs.71%29.aspx[
^],
http://msdn.microsoft.com/en-us/library/aa291552%28v=vs.71%29.aspx[
^],
http://msdn.microsoft.com/en-us/library/ms753931.aspx[
^],
http://msdn.microsoft.com/en-us/library/ms788718.aspx[
^],
http://msdn.microsoft.com/en-us/goglobal/bb688142.aspx[
^],
http://msdn.microsoft.com/en-us/library/21a15yht%28v=vs.100%29.aspx[
^],
http://msdn.microsoft.com/en-us/library/70s77c20.aspx[
^],
http://msdn.microsoft.com/en-us/library/70s77c20.aspx[
^].
—SA