background image
C H A P T E R 2 0
Localizing Newton Applications
Using the Localization Features of the Newton
Displaying the text. This uses the date, time, and number formatting attributes of
the active locale bundle.
The recognition lexical dictionaries need to be, and are, most tolerant. Because
the formats specified in these dictionaries are more loosely defined, you can actually
combine the different formats being used in different countries. These dictionaries
accept constructs such as "77/34/56", a string that doesn't make much sense.
The system lexical dictionaries are used to interpret (that is, parse) recognized text,
so they need to be more strict about accepted formats. For example, if given the
string "12/10/96", the parser needs to know whether the user means that to represent
December 10 or October 12. The system lexical dictionaries impose these restrictions,
and are local-specific.
For more information about dictionary-based recognition, see Chapter 9,
Using the Localization Features of the Newton
This section describes how to localize your applications using the built-in features
of the Newton.
Defining Language at Compile Time
You can write an application so that the language used in strings and other objects
is determined at compile time. There are essentially three parts to doing this:
You define objects called localization frames that define the objects for
different languages. "Defining a Localization Frame" (page 20-4) discusses how
to do this.
You use the
function in place of using the language-dependent object
directly. "Using LocObj to Reference Localized Objects" (page 20-4) discusses
how to do this.
You define the language for a build by using the Project Settings item in the
Project menu. See the Newton Toolkit User's Guide for information on
project settings.
When you do this, you may also want to build strings from components and
measuring the lengths of strings at compile time so that you can arrange your
displays. "Use ParamStr Rather Than "&" and "&&" Concatenation" (page 20-5)
and "Measuring String Widths at Compile Time" (page 20-6) discuss how to do
those tasks.
© 2007-2017, o7 studio » при воспроизведении материала сайта ссылка обязательна