Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Culture

Reply
Thread Tools

Culture

 
 
shapper
Guest
Posts: n/a
 
      04-16-2008
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
 
Reply With Quote
 
 
 
 
Cowboy \(Gregory A. Beamer\)
Guest
Posts: n/a
 
      04-16-2008

"shapper" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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 autot-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!
|
*************************************************


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[MissingManifestResourceException: Could not find any resources appropriate for the specified culture or the neutral culture. Rob Dob ASP .Net Web Controls 0 11-27-2005 03:57 PM
[MissingManifestResourceException: Could not find any resources appropriate for the specified culture or the neutral culture. Rob Dob ASP .Net 0 11-27-2005 03:57 PM
How to change the current thread current culture at run time. Manu ASP .Net 1 07-20-2003 03:27 PM
ASP.NET application wrong culture picked up Aliasgar Pocketwala ASP .Net 2 07-17-2003 02:26 PM
Nasty bug in documentation regarding globalization - wrong Culture Info name for Serbian (Cyrilic) Dejan Vesic ASP .Net 1 07-03-2003 12:32 AM



Advertisments