detect language .net framework

  • Thread starter Thread starter Svyatoslav
  • Start date Start date
S

Svyatoslav

Hi,

I'm writing a program with support for multiple languages.
Therefore, I would need to detect the language of the .net framework that is
installed on the users computer.

I hope someone could help me with this...

Thanx
 
Hi Svyatoslav,

Why would you need to detect the language of the Framework?
You can get the CultureInfo of the operating system like this:

CultureInfo ci = System.Globalization.CultureInfo.CurrentCulture;

People might have a different language version for .Net Framework than
their OS setting (This machine is Windows 98 set to Norwegian, but with an
English .Net Framework)
 
Thank you for your reply, but...

As you said it yourself, the language of the OS is not nessecarily the
same as the language of the framework.

I need to parse the errors of an xml file I made, given a schema file.
With a different language of the framework, the errors will be
different. Therefore, I need to determine what the language is of the
framework.

Hope you understand my problem better now, and I hope even more you
can provide me a solution, if there is one, cause I searched quite a
lot after it...

Thanx.
 
Ah, I see, you want to give your own error in the same language as the
Framework.
However, I don't know how you could detect the language.

A real nasty hack would be to create an exception and compare the error
message with known error messages.
 
Back
Top