C H A P T E R 2 0
Localizing Newton Applications
Using the Localization Features of the Newton
Once you've obtained a bundle, you can examine it to see how your application
should interpret user input or display output.
See "Contents of a Locale Bundle" (page 17-1) in Newton Programmer's
Reference for information on the slots of a locale bundle.
Changing Locale Settings
You cannot change settings in the active locale bundle. To change locale settings,
you need to create a new locale bundle that has the values you want and make it the
active locale. This is called a custom locale bundle. See the next section for
information on how to create on of those.
Creating a Custom Locale Bundle
Every custom locale bundle has a
slot that references another locale
bundle. To create your application's custom locale bundle, use the
function to get the frame to be referenced by your custom locale bundle's
Your custom bundle's
slot must ultimately reference a
system-supplied locale bundle. That does not have to be direct--
you can reference a custom bundle that you know references a
system-supplied bundle, for example.
Your custom locale bundle is simply a frame that includes this
and any additional slots you wish to define to override the values of those inherited
from the prototype. Your custom locale bundle should look like the code in the
usLocaleBundle := FindLocale('usa);
// add slots to be modified
function accepts as its argument a symbol specifying the locale
bundle it is to return. This function returns the locale bundle that has this value in