Product Information > JADE Development Environment User’s Guide > Chapter 11 - Internationalization > Programmatically Maintaining Translatable Strings

Programmatically Maintaining Translatable Strings

JADE provides methods that enable you to write your own extract and load routines for translatable strings and to add and modify translatable strings in a running deployed system.

An application can add translatable strings to a schema and change existing translatable strings. For details about these properties, which are summarized in the following table, see Volume 2 of the JADE Encyclopaedia of Classes.

Class Property Contains a reference to the …
TranslatableString formBuildDataRefs Set of forms that contain the translatable string
TranslatableString locale Locale of the translatable string

The TranslatableString class inherits the properties summarized in the following table from its undocumented metaschema superclass.

Class Property Contains…
Constant constantRefs A reference to a set of translatable strings that use (reference) the translatable string
Constant constantUsages A reference to a collection of translatable strings that are used by (embedded by) the translatable string

For details about these methods, which are summarized in the following table, see Volume 2 of the JADE Encyclopaedia of Classes.

Class Method Description
Schema addCompileTranslatableString Adds a translatable string to all base locales of the receiving schema.
Schema getBaseLocalesLocal Populates the specified collection with the base locales defined in the receiving schema.
Schema getLocaleLocal Returns a reference to the locale object with the specified name in the receiving schema. Note that this method returns both base and clone locales.
Script getSource Method that returns a string containing the current source of the translatable string.
Locale getTranslatableStringLocal Returns the specified translatable string object from the receiving locale. Note that if the receiver is a clone locale, this method always returns null.
Locale getTranslatableStrings Returns a reference to the translatable strings of the receiving locale. If the receiver is a clone, the collection is that of the associated base locale. The collection is in name order.
Locale getTranslatableStringsByNum Returns a reference to the translatable strings of the receiving locale. If the receiver is a clone, the collection is that of the associated base locale. The collection is in number order.
Locale isClone Specifies whether the locale is a clone of another locale.
TranslatableString updateCompile Updates the existing translatable string.

See also "Adding a New Translatable String", "Updating an Existing Translatable String", "Extract Translatable Strings Method Example", and "Load Translatable Strings Method Example", in the following subsections.