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. Advertising

  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. Advertising

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:
    674
    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:
    650
    Mario Vargas
    Jul 17, 2003
  3. Manu
    Replies:
    1
    Views:
    6,108
    Natty Gur
    Jul 20, 2003
  4. S. Justin Gengo

    Re: Differences between culture options

    S. Justin Gengo, Aug 8, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    1,436
    S. Justin Gengo
    Aug 8, 2003
  5. Vidar Petursson

    Re: Javascript: date in culture/language format.

    Vidar Petursson, Aug 15, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    5,511
    Vidar Petursson
    Aug 15, 2003
Loading...

Share This Page