[How Do I:] Create a Multi-Lingual Site with Localization?

Please install Silverlight or click download to watch video locally.

Learn how to create culture-aware and locale-specific web content with no additional code. Use the Resource Editor to create page-level and application-level resources.

Duration: 13 minutes, 37 seconds

Date: 06 January 2006

Watch    Video   |   Download    Video   |   VB Code    C# Code

Video downloads: WMV  |  Zune  |  iPod  |  PSP  |  MPEG-4  |  3GP

Audio downloads: AAC  |  WMA  |  MPEG-4  |  MPEG-3  |  MPEG-2

Comments : 39

Leave a Comment

desaiamarjeet : On March 11, 2008 2:46 AM said:

Whenever i put a button on the page and run that page, the button is showing Stretched.

AnshumanT : On March 30, 2008 12:50 PM said:

How does Request["Language1"] work from inside the content place holder. I am having trouble getting this code to run.

I have a page that I have created from a masterpage. This page contains a content placeholder. Inside the content place holder is my dropdownlist "Language1". When InitializeCulture() is overwritten I do not see the collection being written to the string.

   protected override void InitializeCulture()

   {

       string language = Request["LanguageSelector"];

       if (language != null && language != "")

       {

           Thread.CurrentThread.CurrentUICulture = new CultureInfo(language);

           Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(language);

       }

   }

   

       Auto

       French

       English (US)

       English (UK)</asp:ListItem>

   </asp:DropDownList>

</asp:Content>

I am not sure what I am doing wrong here?

strovek : On April 02, 2008 11:52 PM said:

The example assumes that the DropDownList ID is "Language1".  Your example uses "LanguageSelector".

I did a summary of that in my blog:

programmersjournal.blogspot.com/.../multi-lingual-web-sites-using-aspnet.html

Ays_Hogan : On April 06, 2008 2:21 PM said:

How to Make flags by language when user click on the flag

language changed

Ays_Hogan : On April 06, 2008 2:23 PM said:

By C# plz

Ays_Hogan : On April 08, 2008 6:06 AM said:

Thank you

Soha.Jawabreh : On May 10, 2008 3:44 AM said:

I'd like to get the C# code please

Soha

kingbatspkt : On May 12, 2008 3:05 AM said:

This video is very interesting but how can I do with a Menu?

Thank you.

Diego Vieira : On May 23, 2008 4:45 PM said:

Soha, download it from the "Get C# Code above" or download.microsoft.com/.../Localization_CS.msi

evelec : On May 29, 2008 5:42 PM said:

This tutorial is really helpfull for a simple page but is there any advanced tutorial on Localization with MasterPage, ASP Navigation Control and SiteMap?

Here is my problem :

I use linkbuttons on my MasterPage to change localization (I just have 2 languages). I have localized my sitemap too. Everything works fine but I can't get the localization of the sitemap changed when another culture is selected with the buttonlink. Therefore my menu stays on initial browser language.

Alternatively, I have tried to switch sitemaprovider depending on the culture selected but It does'nt worked.

Thank you

Eve

Peter Fehrman : On July 06, 2008 1:42 PM said:

Does this example work with MasterPages?

darriqb : On July 15, 2008 8:15 PM said:

My issue is the same as Eve's and Peter's. I don't know how much testing they've done, but I've done a LOT. In every case when MasterPages are used, the page does not refresh properly with the resource tags from the selected language. It appears that the AutoPostBack event is executing, but not across all layers of the site. SiteMaps, Resource Keys, etc. none associated with the MasterPage, NOR those inside Content Placeholders change language.

One odd note: as with the sample here, .NET intrensic controls do seem to change. For example, I've put on a LoginView and LoginStatus object within my MasterPage and it appears to be changing to the requested language.

ANY help on this would be GREATLY appreciated.

NOTE: I have looked a the solution with cookies posted and it is not an option for us.

vik20000in : On July 17, 2008 6:19 AM said:

good one

muhammed : On July 22, 2008 4:33 AM said:

good video

Timmen : On July 28, 2008 9:50 AM said:

great video, just one little remark.

French isn't françois but français.

yamu : On July 29, 2008 4:57 PM said:

help is needed in localization with Master page.........my application work fine, I have created menu on master page, and xml file these are working fine when I am change language from browser.. I want to change language throught combobox I donot know, when I am selecting other language it is not fact on cultural languge......... when I change it from browser and load application again then it can apply and change cultural language

here is my code

               style="top: 152px; left: 275px; position: absolute; height: 22px; width: 99px">

               English (US)

               English (UK)

               French

               Swedish</asp:ListItem>

           </asp:DropDownList>

public partial class _Default : System.Web.UI.Page

{

      protected override void InitializeCulture()

   {

       string lang = Request["Language1"];

       if (lang != null && lang != "")

       {

           Thread.CurrentThread.CurrentUICulture = new CultureInfo(lang);

           Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(lang);

       }

   }

}

any one help me it would be wonder ful

Looking forward reply

smartymca : On August 05, 2008 8:59 AM said:

great video but i have a large database and i want to display all its content in hindi language.how could i do this

neerav : On August 06, 2008 5:05 AM said:

Great Video , wel as we can change language by this way can we change the theme of full home page..?

cv_vikram : On August 08, 2008 11:07 AM said:

Very good video...thanks

karolita : On August 23, 2008 2:30 PM said:

I get an Exception with Auto value:

Culture name 'auto' is not supported.

Parameter name: name

Others work fine.

Please any help, thanks.

asater : On August 26, 2008 2:06 PM said:

Very good video

Ambika Purushothaman : On September 16, 2008 5:27 AM said:

How do i populate year in a dropdown.Note:The year format should change according to culture.Eg:In english -2008 in Korean 2008연도

smartymscit : On September 19, 2008 12:28 AM said:

hi 2 all........

can anyone help me pls

i make both default.aspx.resx and default.aspx.fr.resx file

and insert data in xml (resx) file but i it is not disply result....

show label with label txet and button with button text.

djibril_chimere_DIAW : On October 27, 2008 3:51 PM said:

Thanks ! Jërëjëf !

MAlex001 : On November 17, 2008 8:55 AM said:

Good video, but what happen with control like GridView??? How do we set up the header of the columns  in different languages?

uniquesaiful : On November 18, 2008 3:46 AM said:

Culture name "auto" gives an exception. What "auto" actually means? Except this one everything is OK. Good video. Thanks.

aesaif : On December 16, 2008 4:41 PM said:

more than good

webfabrik : On December 19, 2008 5:55 PM said:

thanks!

agrawalbs : On December 22, 2008 1:09 PM said:

great video

mahendraherimath : On December 29, 2008 8:57 AM said:

grt work thanks *****

bohunt : On February 11, 2009 12:24 PM said:

great video.

saif86 : On February 11, 2009 3:15 PM said:

i can't dowenload the video can any one tell me why

ayse_ozturk01@yahoo.com : On March 03, 2009 8:32 PM said:

Hello Again!How Can download these videos instantly.(I mean to download all videos in one click.I am waiting your answers Thanks )

ayse_ozturk01@yahoo.com : On March 03, 2009 11:21 PM said:

Hello Again!How Can download these videos instantly.(I mean to download all videos in one click.I am waiting your answers Thanks )

A.B : On May 03, 2009 11:31 AM said:

It's great video thanks for this , but i've a problem that I need to apply the multi lang. in a dropdwon list and also in CollapsiblePanelExtender texts and this is not work with me,

I don't know where is the mistakes,

I need a help to solve it

Thanks

mtimmermans : On July 09, 2009 7:45 PM said:

That's all nive but not very spider (SEO) friendly. How can I set up this. Becuas people can not add the favorities in a specific langauge. I also think a spider is not working very well with these.

atarikg : On September 15, 2009 12:04 PM said:

Actually according MSDN, explicit localization is used for both global and local resources but implicit localization which is meta:resourcekey="Button1" thing is only used for Local Resources and <%$Resource:WebResources,Button1%> is explicit declaration and WebSources is class and it may not be used for local resource.

vijaymesa : On October 06, 2009 12:06 PM said:

Download(Video, VB, C#) doesn't work...

.net_junkie : On November 24, 2009 5:59 AM said:

i have worked with ur example i have made it but what if i want to change a page into a different language??should i write .resx files for every language or wat???

Leave a Comment

You must be logged in to leave a comment. Click here to log in.

Microsoft Communities