How to change the GUI language?

G

Guest

Hi gurus,
I have a Form with some controls, some of them are my own. The GUI text is
shown in English US.
This application is for our customer in Japan that ask to change the
application GUI language to Japanese.
I have never done such a thing, but I have heard that in .NET/C# over WinXP
it relatively simple.

Can anyone show me how to change the GUI language?
 
M

Morten Wennevik

Hi Sharon,

What you want is 'satellite assemblies' / 'localized resources' in which
google is your friend. The effect is that you store the text for all your
controls in the resource files, and .Net will load the proper resource
file based on your current locale/CultureInfo.
 
S

Stoitcho Goutsev \(100\)

Sharon,

Try to find information on gloablization and localization in MSDN.

If you are developing windows forms application (this is wour case as far as
I understnad) just set the Localizable property of the form to *true* then
costumize your form for different languages (for differend values for the
Language property). VS will create needed satellite assemblies for you and
genereate code for laoding the component language related properties from
these assemblies.
 
S

Steven Cheng[MSFT]

Thanks for all of your inputs,

Hi Sharon,

If what you want to globalize is just your own application, you can have a
look at the globalization/localization features the other guys have
mentioned. Basically, you need to extract all the text in your appliation's
UI out and define them as resource based items so that you can add
resources of different language for them. Here are some MSDN reference on
..net global application development:

#Developing World-Ready Applications
http://msdn.microsoft.com/library/en-us/cpguide/html/cpcondesigningglobalapp
lications.asp?frame=true

#Globalization and Localization Namespaces in Visual Studio
http://msdn.microsoft.com/library/en-us/vbcon/html/vxoriGlobalizationLocaliz
ationNamespaces.asp?frame=true

Hope this helps.

Regards,

Steven Cheng
Microsoft Online Community Support


==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================


This posting is provided "AS IS" with no warranties, and confers no rights.



Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
G

Guest

I have read the MSDN Walkthrough: Localizing Windows Forms at
http://msdn.microsoft.com/library/d...ml/vbwlkwalkthroughlocalizingwindowsforms.asp

(1) But I need to change the UI language at run time at user selection.
How can I do that?

(2) This Walkthrough show how to set for the UI objects all the words using
the VS resource editor.
Is there a tool that takes my default UI language (en-US) resource and let
me (or my translator) generate a new resource file that I can load to my
application at run time ?
Is there a tool that does something like that?
 
S

Steven Cheng[MSFT]

Hi Sharon,

As for (1), it depend on your applciation's localization code logic. If you
will let the user easily change the whole UI culture at runtime(at anytime
they want), you should encapsulate the UI intiliazation(such as text
setting ) in a single function and whenever the current UIculture of the
thread changes, you will need to reinvoke that function to reload the UI of
the the whole form.

As for (2), are you using vs 2005/.net 2.0 or VS 2003, in vs 2005, the resx
file editor is very powerful which can help us edit resx file and add
different kinds of resource items (include image, file, icon, string ,
etc...). If you're still using vs 2003/.net 1.1, you may need to use some
3rd party tools or add-in for resx file editing:

#Resource Editor for VS.NET 2003
http://www.codeproject.com/dotnet/ResourceEditor.asp

Regards,

Steven Cheng
Microsoft Online Community Support


==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================


This posting is provided "AS IS" with no warranties, and confers no rights.



Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top