CurrentCulture and CurrentUICulture

T

Tony Johansson

Hi!

I'm reading in a book and it says "Another important feature is the
CurrentUICulture property of the CultureInfo class.
Although this property is often the same as the CurrentCulture property of
the CultureInfo class, they can and very well might be different. Hence, one
culture can be used for calculation and internal manipulation and another
can be used for display purposes."

This sounds strange why on earth would I have one culture for calculation
and internal manipulation and a different one for displying purposes ?

//Tony
 
A

Alberto Poblacion

Tony Johansson said:
I'm reading in a book and it says "Another important feature is the
CurrentUICulture property of the CultureInfo class.
Although this property is often the same as the CurrentCulture property of
the CultureInfo class, they can and very well might be different. Hence,
one
culture can be used for calculation and internal manipulation and another
can be used for display purposes."

This sounds strange why on earth would I have one culture for calculation
and internal manipulation and a different one for displying purposes ?

Basically you use the UICulture to set the language (English, Spanish,
French,...), while the Culture is used to decide the format for numbers,
dates or currency.
It is not terribly unusual to have different settings for both
properties. For instance, I live in Spain and I have sometimes had to
develop applications that needed to display a user interface in English, but
still had to display currency values in Euros, and dates in d/m/y format.
this is achieved by setting the UICulture to "en-US" and the Culture to
"es-ES".
 
T

Tony Johansson

Good explained!

//Tony

Alberto Poblacion said:
Basically you use the UICulture to set the language (English, Spanish,
French,...), while the Culture is used to decide the format for numbers,
dates or currency.
It is not terribly unusual to have different settings for both
properties. For instance, I live in Spain and I have sometimes had to
develop applications that needed to display a user interface in English,
but still had to display currency values in Euros, and dates in d/m/y
format. this is achieved by setting the UICulture to "en-US" and the
Culture to "es-ES".
 
M

Mihai N.

Basically you use the UICulture to set the language (English, Spanish,
French,...), while the Culture is used to decide the format for numbers,
dates or currency.
++1;


It is not terribly unusual to have different settings for both
properties. For instance, I live in Spain and I have sometimes had to
develop applications that needed to display a user interface in English,
but
still had to display currency values in Euros, and dates in d/m/y format.
this is achieved by setting the UICulture to "en-US" and the Culture to
"es-ES".

--1 ;-)

It is actualy quite useful/common to have different values, because you
don't usualy translate your application into 20 flavors of Spanish,
or 17 flavors of English,
So it is very common to have the UICulture (used for the UI language)
"es" (or "es-ES") or "fr" and the Culture (used for formattig) set to
"es-MX" or "fr-CA"
 

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