J
Jay B. Harlow [MVP - Outlook]
Cor,
normally put it as the very first thing in my Sub Main. When you called the
derived (inherited) form's mybase.new, the base form used the initial
CurrentUICulture, then your derived form used the new CurrentUICulture. The
code that actually reads the localized properties is in each form's
InitializeComponent routine.
are free to implement your own method. In fact Shawn implemented his own
localization for icons, bitmaps & such:
http://www.windojitsu.com/blog/resxsucks.html
I implemented my own localization for XSLT transforms:
http://msmvps.com/jayharlow/archive/2005/01/24/33766.aspx
If you search for the thread "Load icon from resx" in this newsgroup about
27 Jan 2005 you can see a copy of a ResourceLoader based on the same logic
in my code above.
For binary resources such as icons, bitmaps & such, I normally use a method
similiar to Shawn's, largely for the reasons Shawn lists on his page above.
Until the XSLT Transforms, I did not really need to localize them...
One could easily do the same for other resources (strings & property
settings).
very easily implement a single XML file for the resources. By "global" I
mean one private to a Module or Shared Class.
The major advantage of using the built-in stuff is the fall back support.
For example if CurrentUICulture is "de-DE", ResourceManager will look for
"de-DE" resources, if it doesn't find it there, it will look for "de"
resources, if it doesn't find it there, it will look in your base assembly.
As Shawn & I show in the above web pages, adding this fall back support is
not that difficult...
The other major advantage is VS.NET support, which depending on who is doing
the translation may be a hindrance more then a help.
Hope this helps
Jay
You need to set CurrentUICulture before you create any forms! I wouldNow I have put in the sub new (direct after the mybase.new) of the
inherrited form
Threading.Thread.CurrentThread.CurrentUICulture = New
Globalization.CultureInfo("en-US")
normally put it as the very first thing in my Sub Main. When you called the
derived (inherited) form's mybase.new, the base form used the initial
CurrentUICulture, then your derived form used the new CurrentUICulture. The
code that actually reads the localized properties is in each form's
InitializeComponent routine.
There is nothing stating that you need to use the built-in Localization. YouI find this with the RESX a terrible system it seems for me if it is made
by people who never had anything to do with more languages.
are free to implement your own method. In fact Shawn implemented his own
localization for icons, bitmaps & such:
http://www.windojitsu.com/blog/resxsucks.html
I implemented my own localization for XSLT transforms:
http://msmvps.com/jayharlow/archive/2005/01/24/33766.aspx
If you search for the thread "Load icon from resx" in this newsgroup about
27 Jan 2005 you can see a copy of a ResourceLoader based on the same logic
in my code above.
For binary resources such as icons, bitmaps & such, I normally use a method
similiar to Shawn's, largely for the reasons Shawn lists on his page above.
Until the XSLT Transforms, I did not really need to localize them...
One could easily do the same for other resources (strings & property
settings).
Using a "global" instance of a ResourceManager & a single .resx you couldThis languages problem can in my opinion very good be done by an External
XML file where localized people write the correct text. Even when people
from Globalize countries write text in another language in a program, than
you see often strange things.
very easily implement a single XML file for the resources. By "global" I
mean one private to a Module or Shared Class.
The major advantage of using the built-in stuff is the fall back support.
For example if CurrentUICulture is "de-DE", ResourceManager will look for
"de-DE" resources, if it doesn't find it there, it will look for "de"
resources, if it doesn't find it there, it will look in your base assembly.
As Shawn & I show in the above web pages, adding this fall back support is
not that difficult...
The other major advantage is VS.NET support, which depending on who is doing
the translation may be a hindrance more then a help.
Hope this helps
Jay