0

We need to develop an ASP.NET 3.5 Web application, which should support Japanese and English languages. If the user is accessing from Japan, then our application should open in Japanese; otherwise, our application should open in English. How can we achieve this requirement? Sample code is very welcome.

Thanks.

0

2 Answers 2

3

Your question is too broad and yet you expect a code sample. This is an architectural decision, first familiarize yourself with the ASP.NET Globalization mechanisms and then ask more specific questions.

Here are some related posts you will find useful:

2

Simply make a basepage class that will inherited from Page class, put this method in basepage class and inherit basepage class in your every aspx.cs page to acheive globalization.

protected override void InitializeCulture() 
{ 
Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US"); 
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
base.InitializeCulture(); 
}

set culture in this method whatever you want, you can put culture in session variable and whenever user switch language simply change session ..

in your case session value could be en-US,ja

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.