How to Perform Localization to Multiple pages in an application

Last post 06-22-2009 5:29 AM by qwe123kids. 1 replies.

Sort Posts:

  • How to Perform Localization to Multiple pages in an application

    06-22-2009, 3:29 AM

    Hi All,

    I want to develop a Localization application, in which i had 2 options namely English and Tamil. If I click English the whole application should be displayed in English. And if i clicked Tamil, the Whole application must be displayed in Tamil. I have used 2 resource files one for english and other for tamil... And my code is as follows:

     

    Protected Overrides Sub InitializeCulture()

    If Request("l") Is Nothing Then

    UICulture = "en"

    Else

    UICulture = Request("l")

    End If

    MyBase.InitializeCulture()

    End Sub

     

    In Dropdown change event, the code is:

    Protected Sub drpLanguage_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles drpLanguage.SelectedIndexChanged

    lang = drpLanguage.SelectedValue

    If (lang = "en-GB") Then

    Session("CurrentLanguage") = "en-GB"

    UICulture = "en"

    Server.Transfer("~/Default.aspx?l=en")

     

    Else

    Session("CurrentLanguage") = "ta-IN"

    UICulture = "ta" 'Request("l")

    Server.Transfer("~/Default.aspx?l=ta")

    End If

    MyBase.InitializeCulture()

    End Sub

     

    This code is working for a single page alone... Plz Say me how to perform to multiple pages in an application... Its Urgent...

  • Re: How to Perform Localization to Multiple pages in an application

    06-22-2009, 5:29 AM
    Answer
    • All-Star
      21,131 point All-Star
    • qwe123kids
    • Member since 03-27-2008, 5:49 AM
    • Posts 3,634

     hi,

    Check the Video..

    http://www.asp.net/LEARN/videos/video-40.aspx

    It is not tamil and english But it will provide with Good Logic

    Thanks
    Avinash Tiwari

    Remember to click “Mark as Answer” on the post, if it helps you.

    MY Blog

    Hacking Inside .net exe
Page 1 of 1 (2 items)