Class Library & Localization

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi Everyone,

I've been tasked with building a messaging service for a custom app that
supports localization. Within the app itself people will be able to specify
the languge of their choice and therefore can switch at run time.

However, the UI layer will send the locale of choice to my component and
then I must retreive and send standard messages based on this choice.

Is there best practive around doing something like this. Are resource files
the way to do this type of localization? How do I retreive these static
messages from a file based on the locale i was given?

Any code samples or links greatly appreciated.
 
You set up the resource files for all of the different languages. Then you
can set the culture of the thread to the appropriate one, and it will
display the info from the resource file for that culture. For example, this
will set the culture to (general) French.

Thread.CurrentThread.CurrentUICulture = new CultureInfo("fr");

Robin S.
 

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

Back
Top