Localization


Localization is the process of creating resources for a given language or a language and region. When you create a French version of your application, you have localized it. Localization brings with it some more decisions.

You must decide what language you want your exceptions to be thrown in. You might at first think that exceptions should be in the same language as the user interface. Alternatively, you might take the approach that all exceptions should be handled by an application-wide handler, with the exception logged and sent to the support team, and a different (localized) message displayed to the user. In this scenario, you might decide that all exceptions should be in the original developer's language. After all, if your developers are English, how much use is an error message in German? In an ASP.NET application, you might opt for this second approach. In a Windows Forms application, you might adopt both approaches. Consider that an "Unable to find the specified file" exception might be of immediate use to the user, so it could be argued that it should be localized. However, a "Value does not fall within the expected range" exception is of no value to the user (unless the application is a developer tool) and is intended for the developer, so it should probably not be localized.

You also must consider how much or how little your translator will do. Primarily, should the translator redesign forms or Web pages? When text is translated, it is often larger than the original text. You need to decide how to cope with this expansion. The traditional approach has been to let translators redesign forms (moving controls out of the way and resizing controls, for example) so that collisions do not occur. An alternative approach is to design forms with room for expansion. The .NET Framework 2.0 offers an additional solution that allows Windows Forms applications to behave in a similar way to HTML, and bump controls out of the way or wrap text as necessary.

Yet another consideration is how to translate hotkeys. Many controls have hotkey assignments to allow users to jump to controls using a set of keystrokes. For example, Alt+C might jump to a "Country" text box. If the form is localized and the prompt is now, for example, "Pays" instead of "Country," clearly, a hotkey of Alt+C is meaningless. The decision that you need to make is whether to ask your translator to make these hotkey assignments or whether to automate assignments of hotkeys in code. The problem with placing this in the hands of the translator is that the translator might not always be able to see hotkey assignment clashes if he or she cannot see the form on which the text lies. The problem with automating this process is that the most logical hotkey is not always the hotkey that gets assigned.




.NET Internationalization(c) The Developer's Guide to Building Global Windows and Web Applications
.NET Internationalization: The Developers Guide to Building Global Windows and Web Applications
ISBN: 0321341384
EAN: 2147483647
Year: 2006
Pages: 213

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net