Chapter 06: Globalization and Accessibility - MCTS Exam 70-515

Lesson 1: Configuring Globalization and Localization

Using Local Resource Files


Naming Convention

DescriptionNameExampleNotes
DefaultPageName.aspx.resx Orders.aspx.resxUsed when there's no match for the user's language-culture
Language-Specific1PageName.aspx.LanguageID.resxOrders.aspx.es.resx2 
Culture-SpecificPageName.aspx.LanguageID-CultureID.resxOrders.aspx.es-mx.resx3 

1 A list of language and culture codes can be found at http://msdn.microsoft.com/en-us/goglobal/bb896001.aspx.

2 "ES" is the language code for Spanish

3 "ES-MX" is the culture code for a Spanish (Mexico).

Attaching Resources


Using Global Resource Files


Example

The following references the WelcomeString resource entry in the SharedLocalizedText resource file.

Declaratively
<asp:Label ... Text="<%$ Resources:SharedLocalizedText, WelcomeString %>" ></asp:Label>

Programmatically
WelcomeLabel.Text = Resources.SharedLocalizedText.WelcomeString;



Lesson 2: Configuring Accessibility