Runtime enumerating languages supported by application

N

nano2k

Hi

I am developing an aplication and I want to implement multilanguage
support.
I already implemented 2 languages: default is english, the other is
romanian.
In the future I want to implement support for other languages (french,
etc).
Is there a way to detect in runtime all supported languages? I want to
dinamically fill a combobox so the user can choose the desired
language. Otherwise, I have to hardcode the languages combobox and
update it each time a new language support is implemented.

Framework version: 2.0 (VS2005).

I am using the localization mechanism provided by VS2005:
Form.Localizable=true
and a resx file for each supported language.
 
B

Bob Powell [MVP]

Language choice _should_ be made according to the locale of the system. You
don't need to make it a user choice really.

If you are sure that's what you want you could look at teh subdirectories of
your application folder and get the satellite assemblies available. You can
get their locales and provide a list.

--
--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
 
N

nano2k

Thanks.
So, no standard method out there?

Language choice _should_ be made according to the locale of the system. You
don't need to make it a user choice really.

If you are sure that's what you want you could look at teh subdirectories of
your application folder and get the satellite assemblies available. You can
get their locales and provide a list.

--
--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consultinghttp://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Trickshttp://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQhttp://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.









- Afiºare text în citat -
 
M

Mihai N.

So, no standard method out there?
Nope.
But scaning the folders will do.
You can also use reflection to check the version (for safety).

In principle Bob is right, the system should decide.
But Windows is not smart enough to allow for a list of options,
including languages in which the OS is not localized (Mac OS
or browser style).
So I think that a user list is a good thing to have.
 

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