Culture

  • Thread starter Thread starter shapper
  • Start date Start date
S

shapper

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 said:
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!
|
*************************************************
 
Back
Top