Different languages

C

choupi

Hi,

To be able to use different languages in my application, i load into a
StringDictionnary the corrrepondance between controls' names and the
selected language (stored in an bdd used for the application).
Then, for each control, i just read the content of the StringDictionnary.

But i can see there is a specific way to do it with the resources and
CurrentUICulture. Is it really a better way ?

Thanks.
 
K

Kevin Spencer

Yes, it's a better way, because it is non-proprietary, and allows for easy
switching between languages. Each language is compiled in its own resource
file prior to building.

--
HTH,

Kevin Spencer
Microsoft MVP
Logostician
http://unclechutney.blogspot.com

There is a madness to my method.
 
B

Bruce Wood

choupi said:
Hi,

To be able to use different languages in my application, i load into a
StringDictionnary the corrrepondance between controls' names and the
selected language (stored in an bdd used for the application).
Then, for each control, i just read the content of the StringDictionnary.

But i can see there is a specific way to do it with the resources and
CurrentUICulture. Is it really a better way ?

Yes it is, although it will probably take more time to learn. The whole
resource file / current culture thing runs off of the client computer's
settings. It means that your application will act the way all of the
other applications on the machine act, and that's a very good thing. It
means that your (for example) Swiss users won't switch their computers
to Swiss German and then discover that only your app is still in
English because it has its own little tweak. Imagine if every
application had to have its language set separately: what a nightmare!

It may take longer to learn, though, because typically Microsoft's
official solutions cover EVERY eventuality, so they tend to be
complicated. Nonetheless, once you understand how the culture thing
works, it's valuable knowledge.
 

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