Localization problem
-
I have a site which has a domain .eu. All the currency are showing like "230,00 Sk" Instead of "$27.00" In my other hosting which is .com the site is working properly. What do I have to do to show all the currency in dollar format instead of "sk" I am in a hurry. Vikram
-
I have a site which has a domain .eu. All the currency are showing like "230,00 Sk" Instead of "$27.00" In my other hosting which is .com the site is working properly. What do I have to do to show all the currency in dollar format instead of "sk" I am in a hurry. Vikram
It has nothing to do with the domain name. You are relying on the default culture setting of the server, which you have noticed is not very good. Ideally you should specify a CultureInfo or NumberFormatInfo whenever you convert the values to strings. A quick fix until you have had time to go over your code would be to set the CurrentCulture for each thread in global.asax. --- b { font-weight: normal; }
-
It has nothing to do with the domain name. You are relying on the default culture setting of the server, which you have noticed is not very good. Ideally you should specify a CultureInfo or NumberFormatInfo whenever you convert the values to strings. A quick fix until you have had time to go over your code would be to set the CurrentCulture for each thread in global.asax. --- b { font-weight: normal; }
:)THanks for the help What I did was change the uiCulture culture attribute in the globalization tag in web.config and things worked fine for me. :doh:But I would like to know how do i specify a CultureInfo or NumberFormatInfo whenever you convert the values to strings. Do I use a common function which would be doing the job and pass all the conversion through this function Thanks Vikram Lakhotia
-
:)THanks for the help What I did was change the uiCulture culture attribute in the globalization tag in web.config and things worked fine for me. :doh:But I would like to know how do i specify a CultureInfo or NumberFormatInfo whenever you convert the values to strings. Do I use a common function which would be doing the job and pass all the conversion through this function Thanks Vikram Lakhotia
vik20 wrote:
But I would like to know how do i specify a CultureInfo or NumberFormatInfo whenever you convert the values to strings. Do I use a common function which would be doing the job and pass all the conversion through this function
You pass the CultureInfo or NumberFormatInfo to the ToString method. --- b { font-weight: normal; }