Chapter 6 Exercise 1

1. Research and report on the steps needed to create a multi-language version of a form using Microsoft .NET (Web version). Or use Java if your instructor prefers.

Report header (title pages that are printed one time for the entire report), page header (title lines printed at the top of every page), group header (data for a group and headings for the detail section), detail (innermost data), group footer (subtotals for the group), page footer (page totals or page numbers and notes printed at the bottom of every page), and report footer (printed one time at the end of the report including summary notes, overall totals, and graphs for the entire dataset).

The technology has changed over time, so double-check for the current version. Start with http://msdn.microsoft.com/msdnmag/issues/06/08/BasicInstincts/

(1) You can tell the server to pick up the language/culture for each page or for the site.
<%@ page culture="auto" uiculture="auto" %>
<globalization culture="auto:en-US" uiculture="auto:en">
</globalization>
The article has links to code to provide radio buttons to select a language.

(2) Each language translation is stored in a separate resource file (Customer.fr.resx) that must be placed into the App_LocalResources folder. Files are compiled at runtime, and can simply be copied to the server folder. Each item is given a name and the translated text.

For example SubmitButton=...

(3) Assign resource translations to labels.

For example: SubmitButton.Text = Me.GetLocalResourceObject(�ButtonSubmit.Text�).ToString() Or <asp:button id="SubmitButton" runat="server" text="<%$ Resources:SubmitButton.Text %>" />