Answered by:
Localization : Working on one page and not working on the other

Question
-
User-134311585 posted
Hi,
I am developing a multicultural web sites and using resource files.
The page that works fine with resource file and the one that does not work uses same masterpage.
working.aspx.resx
working.aspx.en.resx
----
notworking.aspx.resx
notworking.aspx.tr.resx
These are the files in my App_LocalResources folder. I am changing the cultures using this code block
System.Threading.Thread.CurrentThread.CurrentCulture = thecultureinfo; System.Threading.Thread.CurrentThread.CurrentUICulture = thecultureinfo;
this code block works fine in one page and not works in the other one.
is this a bug or am I doing something wrong ? any ideas ?
Friday, March 25, 2011 5:01 PM
Answers
-
User-1856974186 posted
Check for Culture and UICulture attributes in the @Page attribute in the aspx file and remove them if they are present.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, March 28, 2011 11:22 AM
All replies
-
User1224940435 posted
Is This ASP.net Project or MVC Application ?
If asp.net then use IntializeCulture method of page to change culture.
Also make sure that page is at proper location.
Friday, March 25, 2011 11:24 PM -
User-134311585 posted
it is not an MVC project. regular asp.net 4.0.
I have already override the InitializeCulture method but the problem is that there are two pages with same structure. one page works fine but the other does not. why ? is it because of the working page has Datalists and gridviews that use localization inside headers ?
Saturday, March 26, 2011 3:11 AM -
User4292376 posted
There's not enough information in your post to provide an answer. You have 3 different cultures, default, en, and tr. there is no indication of which culture is not working. First, I would view the resource files and make sure that all 3 default, en, and tr contain the text you expect.
Saturday, March 26, 2011 11:42 PM -
User-1856974186 posted
Check for Culture and UICulture attributes in the @Page attribute in the aspx file and remove them if they are present.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, March 28, 2011 11:22 AM