PC Review


Reply
Thread Tools Rate Thread

CurrentCulture and CurrentUICulture

 
 
Tony Johansson
Guest
Posts: n/a
 
      27th Mar 2010
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



 
Reply With Quote
 
 
 
 
Alberto Poblacion
Guest
Posts: n/a
 
      27th Mar 2010
"Tony Johansson" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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".

 
Reply With Quote
 
Tony Johansson
Guest
Posts: n/a
 
      27th Mar 2010
Good explained!

//Tony

"Alberto Poblacion" <earthling-(E-Mail Removed)> skrev i
meddelandet news:(E-Mail Removed)...
> "Tony Johansson" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> 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".
>



 
Reply With Quote
 
Mihai N.
Guest
Posts: n/a
 
      27th Mar 2010
> 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"


--
Mihai Nita [Microsoft MVP, Visual C++]
http://www.mihai-nita.net
------------------------------------------
Replace _year_ with _ to get the real email

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Seaching to find currency from CurrentUICulture or CurrentCulture WT Microsoft ASP .NET 2 5th May 2009 07:29 PM
Get latest CurrentCulture and CurrentUICulture =?Utf-8?B?SmVu?= Microsoft C# .NET 1 16th Nov 2007 06:04 AM
How to force a refresh of CurrentUICulture and CurrentCulture =?Utf-8?B?TGVvIEdhZ25l?= Microsoft Dot NET Compact Framework 4 13th Jul 2005 03:49 PM
CurrentCulture, CurrentUICulture and Threads DZoid Microsoft ASP .NET 1 24th Sep 2004 09:07 PM
Where do I set CurrentUICulture Ken Microsoft Dot NET 1 31st Jul 2003 08:58 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:52 AM.