Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Apr 25, 2012 04:35 AM by KumarHarsh
Apr 11, 2012 04:19 AM|LINK
my application is multilingual.
I want that only label or literal text to change(valur come from resx file).Rest of the thing should be constant culture wise.
Like when language is change,whole application culture change as a result date,currency format also change.
I do not want this.I want to stop changing date,currency etc. format from changing.
It should be en-US.When user change language only label or literal should change.
What is the best and safest way to achieve this ?
I mean user can type anything in textbox,change culture and save the records.
While the input content ever change because of culture.
Apr 11, 2012 02:37 PM|LINK
Did you try by setting the following in your web.config file?
<globalization uiCulture="en-US" culture="en-US" />
Or at the specific pages,
<%@ Page UICulture="en-US" Culture="en-US" %>
Please 'Mark as Answer' if this post helps you.
Apr 12, 2012 04:07 AM|LINK
I want to get ensure that, only key,value coming from resx file should change text when culture is change.
Rest everything should follow "en-US" culture.
So when user change language no format should change.
for this I hv already fix date and currency problem.
I am not sure if user type anything in other input,will it change its format or it will remain same.
Will string type ever auto change its format ?
No i hvn't tried your suggesation.
Still i want to know,if i use above code,will it change label/literal text according to culture and rest thing remain same.
Apr 12, 2012 06:15 AM|LINK
Only the UICulture needs to be changed for localization. The following post describes how this can be done:
Apr 12, 2012 06:23 AM|LINK
you are not getting my specific requirement and doubts.
Everything is fine.I want that in whole application,only label/literal/any message text changes according to culture.
That is happenning fine.
I am doubtful about data/input entered by user.
Like for example date format also change when culture is change.I wanted to stop this chaning in format.
So i hv done for date and currency.Date and currency format never change,no matter what the culture is.
I am doubtful about unforseen input entered by user any textbox which is not date or currency.
I think string type never changes its format no matter what the culture is.It only changes its language.
Am I right ?
Apr 16, 2012 04:36 AM|LINK
Please refer to the following post:
Apr 16, 2012 05:09 AM|LINK
Nobody bother to know the exact problem.Or ask if it is not clear.
May be I am not explain(put them in correct word) ?
Apr 25, 2012 03:34 AM|LINK
Apr 25, 2012 03:49 AM|LINK
Globalization and Localization
If Globalization/Localization is set then it will be applied to complete page. If you want not to localized date,currency then it needs to be handled through code.
For e.g: if you want Date in en-us format then
string getDT = Convert.ToString(DateTime.Now.ToString("dd-MMM-yyyy", System.Globalization.CultureInfo.CreateSpecificCulture("en-us")));
Let me know if this resolves your issue
Apr 25, 2012 04:35 AM|LINK
For robust and reliable solution,read this link,
Identifying the Current Culture
so commenting Current culture in code can solve the problem.
Am I wrong ?