views:

51

answers:

2

I want to display content in more than one languages in a page. For example all menus are in English and content of post in local language (ie. Hindi).

Contents on page are stored in database. For one post content can be in either language (only one language not all) not in both.

A: 

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

protected override void InitializeCulture()
{
    Thread.CurrentThread.CurrentUICulture = new CultureInfo("hi-IN");
    Thread.CurrentThread.CurrentCulture = new CultureInfo("hi-IN");
    base.InitializeCulture();
}
Muhammad Akhtar
I have changed data type of field from text to ntext. Now it shows content in hindi.
Sharique
Now what is the issue?
Muhammad Akhtar
no issue it is done.
Sharique
A: 

Since I want to display a page in only one language(ie. one page is in Hindi another is in English).So there will exactly one version of a page.

I achieved this by changing data type of field from text to ntext.

Sharique