Last post Jul 18, 2010 01:32 PM by Das.Sandeep
Jul 13, 2010 08:57 PM|Ed_Chiu|LINK
I am working on an ASP.net web application, the application need to display text in English, Chinese and Japanese based on the parameters passed, however the culture settings such as currency symbol, time and number format should remain as en-US locale.
My understanding about ASP.Net localization is a package deal, am I wrong? If I am right, the only way to do this is to roll my own solution?
Jul 13, 2010 11:12 PM|anup_daware|LINK
It is possible to use the ASP.Net localization framework only for resource string keeping the currency and date format out of it.
All you need to do is hardcode the currency string or pick it up from web.config file and use it. Same for date formatting just apply same formatting for all dates.
Very much possible without a lot of hassle!
Hope this helps,
Jul 16, 2010 03:37 PM|Firebreath|LINK
All you would have to do in this case is make sure to set the culture to "en-US" and only change the UICulture to your language you want to display.
It would be something like the following:
Culture = "en-US"
UICulture = strLanguage
Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US")
Thread.CurrentThread.CurrentUICulture = New CultureInfo(strLanguage)
As pointed out on MSDN (Don't have the link handy and I'm lazy :P), Culture takes care of dates, currency, etc... whereas UICulture takes care of the display language.
Hope this helps! :)
Jul 16, 2010 09:45 PM|anup_daware|LINK
Although it depends on your requirement but I see a danger in hardcoding the Culture, if in future you need to show different date format as per the culture selected by the user then it would be a bit difficult to manage the scenario.
I would have still taken the currency string from something like web.config and have a central location from where the currency string is taken. So that if in future I want to show the culture specific currency then I can have that changed just at that
Jul 18, 2010 01:32 PM|Das.Sandeep|LINK
Refer my posted forums: