Globalization

H

hardieca

Hi,

I'm working on a multilingual CMS. I have a number of controls and
labels that are generated based on the number of languages the CMS
supports (ie. for the section management portion of the app, we could
have dynamically generated control labels "English Section Name",
"French Section Name", "Spanish Section Name", etc...)

However, the CMS will also be operated in different languages. The
labels are constructed using strings from resource files being
concatenated with a db lookup on the neutral 2-letter ISO language
code. The issue arises as the language names are stored in English
only, so when I flip over to French, the label that reads "English
Section Name" now reads "Nom du section en English". Not good!

Have language names been translated within .NET, and if so, does
anyone have a clue how I would access them?

Regards,

Chris
 
N

Nicholas Paldino [.NET/C# MVP]

Chris,

I don't believe that the language names themselves have been translated
into other languages. You will have to do some lookup for this, I believe.

Also, I think that the substitution method that you are using isn't
going to be completely correct. In many languages, the form of words can be
changed depending on their usage (much more so than English). Because of
that, you really need to translate the whole phrase, and then retrieve that,
and not just substitute words in the position they should be in the
sentence.

Either that, or your lookup will have to be very specific for the word
you are looking up, as well as the place it is being used.
 
C

Cowboy \(Gregory A. Beamer\)

I concur with Nick. There is no automagic bits for language name.

The norm is to use resource files, either global or local. You can also
create a custom provider. Michele Bustamante has written some wonderful
articles for MSDN.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com
Co-author: Microsoft Expression Web Bible (upcoming)

************************************************
Think outside the box!
************************************************
Nicholas Paldino said:
Chris,

I don't believe that the language names themselves have been translated
into other languages. You will have to do some lookup for this, I
believe.

Also, I think that the substitution method that you are using isn't
going to be completely correct. In many languages, the form of words can
be changed depending on their usage (much more so than English). Because
of that, you really need to translate the whole phrase, and then retrieve
that, and not just substitute words in the position they should be in the
sentence.

Either that, or your lookup will have to be very specific for the word
you are looking up, as well as the place it is being used.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Hi,

I'm working on a multilingual CMS. I have a number of controls and
labels that are generated based on the number of languages the CMS
supports (ie. for the section management portion of the app, we could
have dynamically generated control labels "English Section Name",
"French Section Name", "Spanish Section Name", etc...)

However, the CMS will also be operated in different languages. The
labels are constructed using strings from resource files being
concatenated with a db lookup on the neutral 2-letter ISO language
code. The issue arises as the language names are stored in English
only, so when I flip over to French, the label that reads "English
Section Name" now reads "Nom du section en English". Not good!

Have language names been translated within .NET, and if so, does
anyone have a clue how I would access them?

Regards,

Chris
 
H

hardieca

I figured as much, I had hoped that someone would have been able to
find me a shortcut :)

Will look at the articles you suggested, many thanks.

Chris
 

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