Localization and Nested Master Pages

Discussion in 'ASP .Net' started by shapper, Nov 25, 2006.

  1. shapper

    shapper Guest

    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 _Localization
    2 Inherits Page
    3
    4 Sub Localization_PreInit(ByVal sender As Object, ByVal e As
    EventArgs) Handles MyBase.PreInit
    5 Page.MasterPageFile = "~/_Base.master"
    6 Page.Theme = "_Base"
    7 End Sub
    8
    9 ' _Base master page culture
    10 Protected Overrides Sub InitializeCulture()
    11 MyBase.InitializeCulture()
    12 Dim language As String = CType(Context.Profile,
    ProfileCommon).Language
    13 If (language IsNot Nothing) AndAlso (language <> "Auto") Then
    14 MyBase.UICulture = language
    15 Thread.CurrentThread.CurrentCulture =
    CultureInfo.CreateSpecificCulture(language)
    16 End If
    17 End Sub
    18
    19 End Class

    My Base master page is as follows:

    1 Partial Class _Base
    2 Inherits System.Web.UI.MasterPage
    3 ...
    4 End Class

    And my page is given by:

    1 Partial Class _Default
    2 Inherits Localization
    3 ...
    4 End Class

    Well, now I need page Default to use two master pages. Base and Content
    where:

    Base

    | ----- Content


    Now I am really lost here. Smile

    Could someone help me out in implementing this?

    By the way, I am developing everything at runtime.

    Thanks,

    Miguel
     
    shapper, Nov 25, 2006
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Carl Gilbert
    Replies:
    1
    Views:
    844
    Carl Gilbert
    Jul 8, 2005
  2. MS News

    Themes, Pages, and Master Pages

    MS News, Feb 15, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    446
    MS News
    Feb 15, 2006
  3. Mr. K.V.B.L.

    Problems with IE and nested Master Pages

    Mr. K.V.B.L., Mar 6, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    427
    Mr. K.V.B.L.
    Mar 6, 2006
  4. Doug McCann
    Replies:
    1
    Views:
    1,417
    William Brogden
    Aug 5, 2004
  5. Replies:
    1
    Views:
    3,516
    PeterKellner
    May 16, 2006
  6. =?Utf-8?B?RG9u?=

    Using Master Pages and Base Pages

    =?Utf-8?B?RG9u?=, Sep 12, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    461
    S. Justin Gengo
    Sep 12, 2006
  7. Daniel Magliola
    Replies:
    0
    Views:
    511
    Daniel Magliola
    Apr 9, 2007
  8. katmagic
    Replies:
    0
    Views:
    1,500
    katmagic
    Dec 26, 2008
Loading...