473,395 Members | 1,681 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

ASP.NET Localization not working

Hi,

I have created a Web Project that is set up as follows ($ProjectRoot
is a placeholder for the root directory of the Web Project)

$ProjectRoot/resources/Default.de.resx
$ProjectRoot/resources/Default.resx
$ProjectRoot/Global.asax
$ProjectRoot/Global.asax.cs
$ProjectRoot/test.aspx
$ProjectRoot/test.aspx.cs

In my Global.asax I set the current thread's CurrentCulture and
CurrentUICulture based on the domain of the current request
(within Application_BeginRequest Event Handler). If it is the
..de Domain, I set "de-DE", if it is the .com Domain, I set "en-US".

When I initialize the thread to service the request like this:

CultureInfo cultureInfo = new CultureInfo(culture);
Thread.CurrentThread.CurrentCulture = cultureInfo;
Thread.CurrentThread.CurrentUICulture = cultureInfo;
_rm = new ResourceManager("ISW.resources.Default",
Assembly.GetExecutingAssembly(), null);

Where culture == "de-DE" or "en-US" depending on the domain.

After compilation the /bin directory looks something like this:

/bin/ISW.dll
/bin/ISW.Controls.dll
/bin/de/ISW.resources.dll
/bin/de/ISW.Controls.resources.dll

When I call up by test page, that does nothing
but output the current cultures and a test string
retrieved from the ResourceManager, it works
fine on my development machine.

However when I upload the results to the Web Hoster, and call up
the page, the string will always come back in English
(from the Default.resx) even though the page correctly reports
either "de-DE" or "en-US" as the current culture.

I have already tried moving around my Default.resx and Default.de.resx
files within the project hierarchy. Different ways of initializing
the ResourceManager; to no luck.

Is there anything I am missing or might it have anything to do
with missing access rights on the Web Hoster's side? Should I
be using a different technique for changing my cultures or getting
my resources?

Any help would be highly appreciated.

Thanks

Kai Iske
Nov 17 '05 #1
0 991

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: jagdish patel | last post by:
Hello, I am working on a webapplication with the Localization support.For that I used Localization tool kit of Microsoft. Problem: I cannot add the item into the DropDownList contol,Whose...
1
by: Olivier Matrot | last post by:
Hello, I'm trying to use explicit localization expression to access global resources from an .inc file that's included into several ASPX pages. I may be wrong in my expression, bu accessing...
0
by: gen | last post by:
Hi everybody, We would like to use localization in order to translate our applications. The working environment of the users is very bilingual so they often have to switch from one language to...
5
by: archana | last post by:
Hi all, I am having confusion regarding localization in .net. I have one form on which i have some labels and button. After designing that form what i did is set localization property of form...
2
by: bruno | last post by:
I need to localize my ASP.NET app and I just used "Tools" --"generate local resources" command and everything works fine in my WebForms. Resource file name is: MyWebForm.aspx.resx under a subDir...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.