Are you setting culture every time in ProtectedOverridesSub InitializeCulture() ?
Please check links I posted above. You need to store current culture in session and set application culture each time in
ProtectedOverridesSub InitializeCulture().
Consider having PageBase class which will be inherited by all pages of you application and handle
ProtectedOverridesSub InitializeCulture() in PageBase class.
None
0 Points
11 Posts
Multiple Language
Jun 08, 2010 10:02 AM|voldamirin|LINK
Hi All,
My english is bod so I'm sorry everyone.
i am doing asp.net web page and i am wanting multiple language.
I am using global resx file and local resx file.
on the first page, i'm choosing language. it is work. But i am going to another page, language value is default. Why?
asp.net
Star
12670 Points
3263 Posts
Re: Multiple Language
Jun 08, 2010 10:42 AM|chintanpshah|LINK
Store the selected language in Session variable and set language every time in InitializeCulture event.
My Software Website
Star
12670 Points
3263 Posts
Re: Multiple Language
Jun 08, 2010 10:44 AM|chintanpshah|LINK
Refer:
http://msdn.microsoft.com/en-us/library/bz9tc508.aspx
http://net.blogs.webucator.com/2010/04/07/creating-multi-language-hello-world-kiosk-page/
http://forums.asp.net/p/1535026/3729706.aspx
My Software Website
None
0 Points
11 Posts
Re: Multiple Language
Jun 09, 2010 02:02 AM|voldamirin|LINK
yes it is work but i selected next page and i want to take one record in the behind code.
i am using
this code.Always get default language. Why?
asp.net
Star
12670 Points
3263 Posts
Re: Multiple Language
Jun 09, 2010 02:27 AM|chintanpshah|LINK
Are you setting culture every time in Protected Overrides Sub InitializeCulture() ?
Please check links I posted above. You need to store current culture in session and set application culture each time in
Protected Overrides Sub InitializeCulture().
Consider having PageBase class which will be inherited by all pages of you application and handle Protected Overrides Sub InitializeCulture() in PageBase class.
My Software Website
None
0 Points
11 Posts
Re: Multiple Language
Jun 09, 2010 07:47 AM|voldamirin|LINK
yes. Next page my selected language. But this code give the default language value.
Star
12670 Points
3263 Posts
Re: Multiple Language
Jun 09, 2010 08:11 AM|chintanpshah|LINK
Put breakpoint at you code and check what you get for
Thread.CurrentThread.CurrentCulture
Thread.CurrentThread.CurrentUICulture
You need to set it like:
Please follow tutorials on how to store and set culture from links I posted.
My Software Website
None
0 Points
11 Posts
Re: Multiple Language
Jun 17, 2010 03:00 AM|voldamirin|LINK
this code is work. Thanks for answers
Star
12670 Points
3263 Posts
Re: Multiple Language
Jun 17, 2010 03:33 AM|chintanpshah|LINK
Whenever you issue is resolved, please mark post as answe. This will benefit other members in future to find answer quickly.
My Software Website
None
0 Points
18 Posts
Re: Multiple Language
Jul 16, 2010 11:22 AM|daccit|LINK
Hi voldamirin,
if u want to make multiple language website please do visit
http://www.codeproject.com/KB/aspnet/localizationByVivekTakur.aspx
Thanks
Ankit
Daccit Pvt Ltd