Gwl wrote:
I'm writing an application in which the user can change the default
ouput language while the program is running. I have no problem to do
it when there is only a form opened, but if I have a situation like a
second form opened I don't know how I could change the otuput language
in the main form and in all the background forms. Any advice?
You'll have to go through the original form and change the titles of the
control. I assume that this second form changes the CurrentUICulture on
the GUI thread. If this is the case then add a method to your main form
that the second form can call. Now look in the InitializeComonent and
copy the code that initializes the ResourceManager and copy any code
that uses the ResourceManager object.
When a form is created a ResourceManager is created, this searches for,
and loads a 'satellite assembly' which has the localised resource. The
code then calls the ResourceManager and asks for a particular item,
RsourceManager reads the item from the localised resource in the
satellite assembly and uses this to initialise controls on the form. You
just need to replicate this code.
Richard
--
http://www.grimes.demon.co.uk/workshops/fusionWS.htm http://www.grimes.demon.co.uk/workshops/securityWS.htm