473,395 Members | 1,742 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.

Localization: User selectable UICulture - ASHX Handlers

Hi,

I have 'localized' the button images in my web app by using an HTTP handler file for each image so the correct langauge imagebutton can be loaded depending on the users language.

In the ASHX file, i set the CurrentUICulture for the current thread using the following line, which reads the users' broswer default langauge. This works fine.

Thread.CurrentThread.CurrentUICulture = New CultureInfo(context.Request.UserLanguages(0))

However, on the Login page of the web app i have a dropdown so that users can manually select a language. This gets passed into a variable called 'gblLanguage' and on each ASPX page i use the Protected Overrides Sub InitializeCulture() function to set the Thread.CurrentThread.CurrentUICulture = New CultureInfo(gblLanguage) if a user has manually selected a language from the dropdown.

This works on all of the aspx pages but i can't access gblLanguage from my handler ASHX files. I have also tried using sessions to pass the language through but can't get this to work either.

Please could you tell me how i can pass through the user selected language from my login page to my ASHX files so that they can call the correct Resource files to load the images.

Many thanks,

Nick.
Oct 26 '07 #1
0 1923

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: James | last post by:
I am preparing a web site to include localization functionality. In addition to supporting the list of cultures available from the .net framework I would like to support the Maori langauge. As...
2
by: Paul M | last post by:
Hi there, can anyone help me with this one.... i have a page which is in normal english format, but when i wanna change it to Russian format text, i set the Culture code, but it still remains...
1
by: Detlef Hüttenbach | last post by:
There is a bug within the Handler factory that messes up the streams loaded from memory. Workaround: Don't use the HandlerFactory, i.e.: ashx-handlers when you need to print images from streams...
5
by: Samuel | last post by:
Hi, I am running into a problem of mixing UICulture = auto and allowing users to select culture using a dropdown list. I am detecting a querystring, "setlang", and when found, setting the...
8
by: Olivier Matrot | last post by:
I encounter a problem with Localization features in ASP.NET 2.0. Is seems that the framework is not able to manage neutral cultures such as 'fr', or 'de'. Those are the culture sent by default from...
5
by: Roshawn Dawson | last post by:
Hi, Has anybody created an entire asp.net app using only ashx files? I know that they are simply handlers used by the asp.net worker process. I hear that they are in some respects better than...
5
by: Mikeon | last post by:
Hello! I have tried to localize my Web.sitemap file using implicit localization but it doesn't seem to work. What I have done until now: I have created a sample Web.sitemap file: <?xml...
0
by: shapper | last post by:
Hello, Sometime ago I followed an article (I believe MSDN) related with localization in Asp.Net 2.0. To make pages localization I create a class named Localization: 1 Public Class...
3
by: George | last post by:
I am doing an AJAX call using JQuery on my page to which returns JSON objects and everything works fine. Now I decided to use ashx handler instead of and simply write JSON out. Then my problems...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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.