English 中文(简体)
有哪些活动(地点)应当用于改变文化和语言网站的文化和日历?
原标题:what event(place) should i use for change culture and calendar in mulilanguage web site?

i have a multi language web site...
i made two folders in visual studio for languages(en + my language)and made my web site for each one!
for one language web site i had a class for changing culture and calendar to my culture and callled that class in Global.asax like below :

protected void Application_BeginRequest(object sender, EventArgs e)
{
    myLanCultureAndCalendar.SetCultureAndCalendar();
}

but for multi language web site what can i do about that class ?
mean where should i call that class for each languages?
my pages are base on master and content pages

如你所知,“全球编码” 第一、四、二、后一,我们有内容页。 Load -> and at final page_ Load

最佳回答

I think you have to implement that class in Application_BeginRequest event ...like this..

protected void Application_BeginRequest(Object sender, EventArgs e)
{
    String language = Request.UserLanguages[0];
    if (language.Length > 1) language = language.Substring(0, 2);
    .......
    ........

}

我建议你通过这一链接:

我希望这将有助于你。

问题回答

暂无回答




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签