Answered by:
Localization problem vs2010

Question
-
User-1819533987 posted
Hey,
I have tried every method I can find about localization but no one is working.
I have a page LocTest.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="LocTest.aspx.cs" Inherits="Green.LocTest" UICulture="auto" Culture="auto" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> <asp:Label ID="lblLocTest" runat="server" meta:resourcekey="lblLocTest" Text="English" /> </div> </form> </body> </html>
I have two resources files:
LocTest.resx and LocTest.sv-SE.resx which should set the lables text to "English" or "Svenska" depending of the language setting in the browser.
This should just work acording to many sites, some write that I need to put code in the Page_PreInit, Globax.asax or Web.config but nothing works not even when I try to hard code the culture to be used.
Do's anyone have any samples that I can use just to see that it works cause I'm ready to give up (which I can't unfortentley).
Tuesday, September 21, 2010 5:16 AM
Answers
-
User-1200560727 posted
Hi,
Please refer the below link:
http://mosesofegypt.net/post/2008/02/Applying-localization-with-MasterPages.aspx
I have used same solution for applying Multiligual from Master Page to all Content Page.
I hope you will get an exact solution.
Regards,
Tapan
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Tuesday, September 21, 2010 7:21 AM
All replies
-
User-1828494216 posted
Hi,
are you using MasterPages? Do you wish to localize multiple pages or just one?
Tuesday, September 21, 2010 5:52 AM -
User-1200560727 posted
Hi,
Please refer the below link:
http://mosesofegypt.net/post/2008/02/Applying-localization-with-MasterPages.aspx
I have used same solution for applying Multiligual from Master Page to all Content Page.
I hope you will get an exact solution.
Regards,
Tapan
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Tuesday, September 21, 2010 7:21 AM -
User-1819533987 posted
Hi, good article but it still won't work, I can see that it changes the culture from the cookie but nothing changes on the site.
Could the folder structure have anything to do with it, it looks like this:
Project
App_LocalResources
resx files (e.g. Central.sv-SE.resx)
Pages
aspx files
Masterpage file
Could it be a setting in the iss that causes it? I'm running everyting localy on my computer using vs2010.
Or can't I use resx files and have to change the text manually in code behind?
Thursday, September 30, 2010 8:30 AM