[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

adding localization in master page

Posted on 2012-04-11
1
Medium Priority
?
314 Views
Last Modified: 2012-05-30
I would like to access this code from my pages that belong to this master page........
How Can I do so all i would have to do is to call for loadstring function on my regular pages?



'this code is right below declaration of class
    Private rm As ResourceManager

'my page load code
    Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        Dim ci As CultureInfo

        If Not Page.IsPostBack Then
            Thread.CurrentThread.CurrentCulture = New CultureInfo("en-US")
            'get the culture info to set the language
            rm = New ResourceManager("Resources.Strings", _
            System.Reflection.Assembly.Load("App_GlobalResources"))
            ci = Thread.CurrentThread.CurrentCulture
            LoadStrings(ci)
        Else
            'get the culture info to set the language
            rm = New ResourceManager("Resources.Strings", _
                 System.Reflection.Assembly.Load("App_GlobalResources"))
            ci = Thread.CurrentThread.CurrentCulture
            LoadStrings(ci)
        End If
        ' If Not IsPostBack Then FillList()

    End Sub

'my load string
    Private Sub LoadStrings(ByVal ci As CultureInfo)

        '  lblwelcome.Text = rm.GetString("welcome", ci)
        lblcust2.Text = rm.GetString("customer", ci)
        lblcust3.Text = rm.GetString("customer", ci)
        lblname.Text = rm.GetString("name", ci)
        lblname2.Text = rm.GetString("name", ci)
        lblterms2.Text = rm.GetString("terms", ci)
        lblshipvia2.Text = rm.GetString("shipvia", ci)
        lblquote.Text = rm.GetString("order", ci)
    End Sub
0
Comment
Question by:Wigging
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 2000 total points
ID: 37835330
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question