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.
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.
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.
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.
KumarHarsh
All-Star
15155 Points
3658 Posts
Multilingual Web Application
Apr 11, 2012 04:19 AM|LINK
Hi,
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.
Thanks
Kumar Harsh
Ruchira
All-Star
44171 Points
7179 Posts
MVP
Re: Multilingual Web Application
Apr 11, 2012 02:37 PM|LINK
Hello,
Did you try by setting the following in your web.config file?
Or at the specific pages,
My Tech blog | My YouTube ChannelPlease 'Mark as Answer' if this post helps you.KumarHarsh
All-Star
15155 Points
3658 Posts
Re: Multilingual Web Application
Apr 12, 2012 04:07 AM|LINK
Hi,
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.
Kumar Harsh
vijayst
All-Star
16558 Points
3216 Posts
Microsoft
Re: Multilingual Web Application
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:
http://blogs.dotnetkicks.com/vijayst/2011/08/localization-of-webforms-applications-in-multiple-languages/
http://liteblog.codeplex.com
KumarHarsh
All-Star
15155 Points
3658 Posts
Re: Multilingual Web Application
Apr 12, 2012 06:23 AM|LINK
Hi Vijay,
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 ?
Kumar Harsh
Frank Jiang ...
All-Star
16006 Points
1728 Posts
Microsoft
Re: Multilingual Web Application
Apr 16, 2012 04:36 AM|LINK
Please refer to the following post:
http://forums.asp.net/t/1728605.aspx/1?how+do+we+create+a+multi+language+site+
Feedback to us
Develop and promote your apps in Windows Store
KumarHarsh
All-Star
15155 Points
3658 Posts
Re: Multilingual Web Application
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) ?
Sorry
Kumar Harsh
BuNanHe
Member
44 Points
7 Posts
Re: Multilingual Web Application
Apr 25, 2012 03:34 AM|LINK
http://msdn.microsoft.com/en-us/library/ff647353.aspx
Deepak_Talel...
Member
458 Points
87 Posts
Re: Multilingual Web Application
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
Ph: 91-9158413830
Email: deepak_talele@hotmail.com, deepak_talele@yahoo.com
KumarHarsh
All-Star
15155 Points
3658 Posts
Re: Multilingual Web Application
Apr 25, 2012 04:35 AM|LINK
For robust and reliable solution,read this link,
http://msdn.microsoft.com/en-us/library/ff647353.aspx
Identifying the Current Culture
so commenting Current culture in code can solve the problem.
Am I wrong ?
Kumar Harsh