Included in the zip file are the ASP.NET V2 Demos and the ASP.NET and Windows Vista Internationalisation Slide Decks.
If you’ve built an ASP.NET app and wanting to make it multilingual then it’s pretty darn simple.
- Load up your aspx page in design or source view
- From Tools Menu select “Generate Local Resources”
- This will generate you a resources file matching the name of the aspx page in the App_LocalResources. eg Default.aspx would create a Default.aspx.resx file.
- Create a copy of this file in the App_LocalResources directory and name it according to “RFC 3066 – Tags for identifying languages“, or check out the languageCode-CountryCodes under IE -> Internet Options -> Languages.
- For French Canadian if you created a local resources file for default.aspx then you’d create a default.aspx.fr-ca.resx file.
- To create resources just for French then you’d create a file called default.aspx.fr.resx
- If the browser language was set to “fr-ca” then the default.aspx.fr-ca.resx resources would be used
- If the browser language was set to “fr” or another French speaking country such as “fr-ch” the resources would be drawn from the default.aspx.fr.resx, failing not being able to find the required resource the Resource Manager would fall back to default.aspx.resx.
- Check out the slides at http://projectdistributor.net/Releases/Release.aspx?releaseId=312 and see http://www.asp.net/QuickStart/aspnet/doc/localization/default.aspx
The ASP.NET Localize Server Control
Use the “Localize” Server Control to add string literals rather then typing them directly on to a page. The Localize control has design time support, so unlike a “Label” or “Literal” you can add text directly to the control on the page.
The advantage of using the “Localize” control is that text in the control will be picked up by the “Create Local Resources” generator tool, a local resource will be created and it’ll make your transition to multilingual a whole lot easier.
There is a W3C Working Group working on design guidelines for multilingual sites such as dealing with languages that flow right to left. When I find the link I’ll post it as a comment against this posting…
Other useful resources include:-
- ASP.NET Quick Starts: http://www.asp.net/QuickStart/aspnet/doc/localization/default.aspx
- Michele Leroux Bustamante’s Globalization Site: http://www.dotnetdashboard.net/sessions/globalization.aspx
- Michele’s Blog: http://www.dasblonde.net
- General guidelines on internationalization: http://www.microsoft.com/globaldev
- Developing International Software