Culture

Discussion in 'ASP .Net' started by shapper, Apr 16, 2008.

  1. shapper

    shapper Guest

    Hello,

    I am working with VS 2008 and ASP.NET 3.5.

    In my Web.Config file I have the following:

    <globalization culture="pt-PT" uiCulture="pt-PT"/>

    I suppose this sets the default culture of my web site.

    All pages in my web site inherits from a master page named Base.

    How can I, in Base.Master VB code, change the culture from the default
    value to EN instead of changing in each page?

    Thanks,
    Miguel
     
    shapper, Apr 16, 2008
    #1
    1. Advertisements

  2. "shapper" <> wrote in message
    news:...
    > Hello,
    >
    > I am working with VS 2008 and ASP.NET 3.5.
    >
    > In my Web.Config file I have the following:
    >
    > <globalization culture="pt-PT" uiCulture="pt-PT"/>
    >
    > I suppose this sets the default culture of my web site.


    Yes. And it also states "no matter what the user wants, give him the default
    language". Change to auto:pt-PT for both.

    > All pages in my web site inherits from a master page named Base.
    >
    > How can I, in Base.Master VB code, change the culture from the default
    > value to EN instead of changing in each page?


    me.Page.UICulture = ""

    me.Page.Culture = ""

    And set the proper name. This can be done in any event.

    If you also want to change theme, you will have to do it in OnPreInit in the
    base class. I believe you also have to bury master page changes here, as
    well.

    --
    Gregory A. Beamer
    MVP, MCP: +I, SE, SD, DBA

    Subscribe to my blog
    http://gregorybeamer.spaces.live.com/lists/feed.rss

    or just read it:
    http://gregorybeamer.spaces.live.com/

    *************************************************
    | Think outside the box!
    |
    *************************************************
     
    Cowboy \(Gregory A. Beamer\), Apr 16, 2008
    #2
    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. Dejan Vesic
    Replies:
    1
    Views:
    818
    Chee Seong Ong
    Jul 3, 2003
  2. Aliasgar Pocketwala

    ASP.NET application wrong culture picked up

    Aliasgar Pocketwala, Jul 17, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    796
    Mario Vargas
    Jul 17, 2003
  3. Manu
    Replies:
    1
    Views:
    6,424
    Natty Gur
    Jul 20, 2003
  4. Vidar Petursson

    Re: Javascript: date in culture/language format.

    Vidar Petursson, Aug 15, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    5,682
    Vidar Petursson
    Aug 15, 2003
  5. Mircea Pleteriu

    Crystal Reports Culture Info

    Mircea Pleteriu, Aug 28, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    978
    Mircea Pleteriu
    Aug 28, 2003
  6. Mike Prager

    Culture and Codepage question

    Mike Prager, Aug 30, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    1,586
    Mike Prager
    Aug 30, 2003
  7. Bogdan POPESCU

    Culture and validators

    Bogdan POPESCU, Oct 24, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    1,558
  8. Chris Porter

    timezone / culture weirdness

    Chris Porter, Oct 24, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    457
    Bret Mulvey [MS]
    Oct 25, 2003
Loading...