locked
mulitlanguage site with session in VB RRS feed

  • Question

  • User-18981312 posted

    Hello everyone, 

    I have viewed the following tutorial http://asp.net/learn/videos/view.aspx?tabid=63&id=40 which shows how to use change the language by using the following code

     

    Imports System.Threading
    Imports System.Globalization

    Partial Class _Default
        Inherits System.Web.UI.Page
        Protected Overrides Sub InitializeCulture()
            Dim lang As String = Request("Language1")
            If lang IsNot Nothing Or lang <> "" Then
                Thread.CurrentThread.CurrentUICulture = New CultureInfo(lang)
                Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(lang)
               
            End If
        End Sub

      

    End Class


     

    I am new to asp. I wanted to know how I can change the culture for all subsequent pages, because this video show how to change the culture for one website. So the user will come in and select either english or french from the main page and all subsequent pages should be changed in that language. How can i made multi language site with session in VB?

    Thank you, for your answers.

    With regards,

    eim

    Tuesday, February 3, 2009 7:00 AM

Answers

  • User-1136466523 posted

    Hi,

    From your description, it seems that you want to change the globalization culture settings in application level, not the page level, right?

    If so, you may try the following article which shares some information on how to set the Culture information in an ASP.NET application, Application Level, Page Level, and Thread Level.

    http://support.microsoft.com/kb/306162/en-us

    You may use ConfigurationManager to access the section value programmatcially.

    Thanks.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, February 8, 2009 11:27 PM