Index: openacs-4/packages/acs-core-docs/www/i18n-introduction.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/i18n-introduction.adp,v diff -u -r1.1.2.6 -r1.1.2.7 --- openacs-4/packages/acs-core-docs/www/i18n-introduction.adp 9 Jun 2016 08:44:49 -0000 1.1.2.6 +++ openacs-4/packages/acs-core-docs/www/i18n-introduction.adp 23 Jun 2016 08:32:45 -0000 1.1.2.7 @@ -15,20 +15,20 @@ works in OpenACS

This document describes how to develop internationalized OpenACS packages, including writing new packages with internationalization and converting old packages. Text that users might see is -"localizable text"; replacing monolingual text and single-locale -date/time/money functions with generic functions is -"internationalization"; translating first generation text into a -specific language is "localization." At a minimum, all packages -should be internationalized. If you do not also localize your -package for different locales, volunteers may use a public -"localization server" to submit suggested text. Otherwise, your -package will not be usable for all locales.

The main difference between monolingual and internationalized +"localizable text"; replacing monolingual text and +single-locale date/time/money functions with generic functions is +"internationalization"; translating first generation text +into a specific language is "localization." At a minimum, +all packages should be internationalized. If you do not also +localize your package for different locales, volunteers may use a +public "localization server" to submit suggested text. +Otherwise, your package will not be usable for all locales.

The main difference between monolingual and internationalized packages is that all user-visible text in the code of an -internationalized package are coded as "message keys." The message -keys correspond to a message catalog, which contains versions of -the text for each available language. Script files (.adp and .tcl -and .vuh), database files (.sql), and APM parameters are -affected.

Other differences include: all dates read or written to the +internationalized package are coded as "message keys." +The message keys correspond to a message catalog, which contains +versions of the text for each available language. Script files +(.adp and .tcl and .vuh), database files (.sql), and APM parameters +are affected.

Other differences include: all dates read or written to the database must use internationalized functions. All displayed dates must use internationalized functions. All displayed numbers must use internationalized functions.

Localizable text must be handled in ADP files, in Tcl files, and @@ -49,7 +49,7 @@

Separate Templates for each Locale

If the request processor finds a file named filename.locale.adp, where locale matches -the user's locale, it will process that file instead of +the user's locale, it will process that file instead of filename.adp. For example, for a user with locale tl_PH, the file index.tl_PH.adp, if found, @@ -67,18 +67,19 @@ then be dynamically replaced with real human language in the desired locale. Message keys themselves should be in ASCII English, as should all code. Three different syntaxes are possible for -message keys.

"Short" syntax is the recommended syntax and should be used for -new development. When internationalizing an existing package, you -can use the "temporary" syntax, which the APM can use to -auto-generate missing keys and automatically translate to the short -syntax. The "verbose" syntax is useful while developing, because it -allows default text so that the page is usable before you have done -localization.