56
Chapter 7: Flash Application Layout
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
7.3.4. Language Localization
Menu titles and item names, dialog text, help strings, error messages, TI
-
BASIC
extension names, the name of the application as it appears on the app’s pop-up
menu, any string which appears in the app’s object frame, can be overridden with
a localizer app to add language customization. By placing all strings in the frame
and using
XR_stringPtr
to cross-reference string numbers to string pointers, the
job of localizing an app for a different language becomes much easier.
An application is typically localized by installing a small companion app which
contains translations of all the app’s strings for one or more languages. When the
user chooses a different language on the MODE screen, all apps are notified of
the new language. Each localizer app which contains a matching language,
responds by overriding its target app’s strings.
7.3.4.1. Localizer Template
The following sample application is a template localizer app. It can be used to
customize a target app for a different language. There are places in the template
to supply the language, internal name, app’s menu name of the target
application, and the translated strings.
Strings in the localizer app override strings with the same attribute number in the
target app’s object frame. Therefore, it is important that translated strings in the
localizer use the same string numbers as the target app. A mismatch between
the localizer string numbers and the target string numbers will lead to confusing
menus and messages in the target when localization is applied.
/* Sample application localizer */
#include "tiams.h"
/**********************************************************************
Set MyLang to the name of the language which this localizer implements.
**********************************************************************/
char const MyLang[] = "Fran" RF_C_CEDILLA "ais";
/**********************************************************************
Set TargetApp to the internal name of the app which this localizer
will hook into. This is the same name described in section
7.1.3.2. Internal Application Name.
**********************************************************************/
unsigned char const TargetApp[] = "DEMOAPP";
/**********************************************************************
Set APPSname to the name Target app should have on the [APPS] menu key.
**********************************************************************/
char const APPSname[] = "Application de D" RF_E_ACUTE "monstration";