473,396 Members | 1,940 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,396 software developers and data experts.

Localizing problem

I been stepping through the code as described in the videos for Master pages
and site Navigation and the one for localization.

I get the idea behind both but I'm trying to put em together to put together
a web site that is localized AND uses master pages, whose controls (labels
etc.) can also be localized.

This is the code I came up with in the Defaultaspx page to permit the
modification of the controls depending on a language seleceted in the
dropdown list on the page, in my default.aspx.vb file (language1 is the name
of the dropdownlist on that page)
Imports System.Globalization

Imports System.Threading

Partial Class _Default

Inherits System.Web.UI.Page

Protected Overrides Sub InitializeCulture()

Dim loc As String = Request("language1")

If Not IsNothing(loc) Or loc <"" Then

Thread.CurrentThread.CurrentUICulture = New CultureInfo(loc)

Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(loc)

Else

Thread.CurrentThread.CurrentUICulture = New CultureInfo("fr-CA")

Thread.CurrentThread.CurrentCulture =
CultureInfo.CreateSpecificCulture("fr-CA")

End If

Session("Locale") = loc

End Sub

If I include the default.aspx file in a master page, the
Request("language1") remains at nothing, how should I handle the change of
language in the dropdownlist when using master pages. I thought it would
remain handled the same way.

Also when I change the language selected in the default page, I will need to
change the contents of controls that are on the master page, how can I do
that?

I was thinking just now of placing the language selector on the master page
and have a change there 'trickle down' to all the other open pages, is this
possible and if so how?

If anyone has sample bits of code for doing this I would appreciate it very
much

Regards,

Bob






Apr 23 '07 #1
0 949

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

Similar topics

117
by: Peter Olcott | last post by:
www.halting-problem.com
28
by: Jon Davis | last post by:
If I have a class with a virtual method, and a child class that overrides the virtual method, and then I create an instance of the child class AS A base class... BaseClass bc = new ChildClass();...
3
by: Trapulo | last post by:
I've a datarepeater that loads custom external templates with loadtemplate and bind data to them. All ok. Now I need to localize some text labels, but I don't know how can I change this data. If I...
3
by: Andre Nogueira | last post by:
Hi there. I am developing an application using Visual Basic .Net 2003. So far I have localized my forms and their controls using the VS.net Ide (Setting localized to True, choosing a language and...
24
by: Nak | last post by:
Hi there, I have some inherited forms that I wish to make "localizable", unfortunately none of the items I wish to be "localizable" are actually being "localized". For example, I have a few of...
3
by: WT | last post by:
Hello, Using english version of vs 2005 to develop, my setup dialogs are all displayed in english, is there some way to have it displayed according the current culture using resources as we do for...
1
by: Robert Dufour | last post by:
I want to be able to set my application's UI to appear in English or French. To that end I have a language string value in the app.config file and the following code. Sub Main Curlocale =...
0
by: =?Utf-8?B?U3VzaGlTZWFu?= | last post by:
I have question about pages localizability. So for example I have 3 pages on my site ================== main.aspx users.aspx products.aspx ================== I want make Localizing for them....
1
by: Gilles Ganault | last post by:
Hello I'm trying to localize a small PHP application which uses date() to display a date saved as Epoch in MySQL, but I can't get the month to be displayed in French: ========= //BAD...
0
by: cmdolcet69 | last post by:
I have an issue with localizing forms, I added a button to my form and then set my form to localizable property = true. changed my language from default to Spanish and saved. I built the...
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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.