Index: openacs-4/packages/acs-core-docs/www/i18n-introduction.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/i18n-introduction.html,v diff -u -N -r1.4.2.2 -r1.4.2.3 --- openacs-4/packages/acs-core-docs/www/i18n-introduction.html 5 Jul 2004 19:47:30 -0000 1.4.2.2 +++ openacs-4/packages/acs-core-docs/www/i18n-introduction.html 1 Nov 2004 23:39:45 -0000 1.4.2.3 @@ -1,4 +1,4 @@ -How Internationalization/Localization works in OpenACS

How Internationalization/Localization works in OpenACS

+How Internationalization/Localization works in OpenACS

How Internationalization/Localization works in OpenACS

This document describes how to develop internationalized OpenACS packages, including writing new packages with internationalization and converting old packages. Text that @@ -32,7 +32,7 @@ which are static and mostly text, it may be easier to create a new ADP page for each language. In this case, the pages are distinguished by a file naming convention. -

User Content

OpenACS does not have a general system for supporting multiple, localized versions of user-input content. This document currently refers only to internationalizing the text in the package user interface.

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 filename.adp. For example, for a user with locale tl_PH, the file index.tl_PH.adp, if found, will be used instead of index.adp. The locale-specific file should thus contain text in the language appropriate for that locale. The code in the page, however, should still be in English. Message keys are processed normally.

Message Catalogs

Message Keys in Template Files (ADP Files)

+

User Content

OpenACS does not have a general system for supporting multiple, localized versions of user-input content. This document currently refers only to internationalizing the text in the package user interface.

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 filename.adp. For example, for a user with locale tl_PH, the file index.tl_PH.adp, if found, will be used instead of index.adp. The locale-specific file should thus contain text in the language appropriate for that locale. The code in the page, however, should still be in English. Message keys are processed normally.

Message Catalogs

Message Keys in Template Files (ADP Files)

Internationalizing templates is about replacing human readable text in a certain language with internal message keys, which can then be dynamically replaced with real human language in @@ -82,7 +82,7 @@ auto-generated by the APM. Example: <_ Title>

We recommend the short notation for new package development. -

Message Keys in TCL Files

+

Message Keys in TCL Files

In adp files message lookups are typically done with the syntax \#package_key.message_key\#. In Tcl files all message lookups *must* be on either of the following formats: @@ -173,7 +173,7 @@ and insert into catalog" on the TCL files that you've edited to replace the temporary tags with calls to the message lookup procedure. -

Dates, Times, and Numbers in TCL files

+

Dates, Times, and Numbers in TCL files

Most date, time, and number variables are calculated in TCL files. Dates and times must be converted when stored in the database, when retrieved from the database, and when displayed. All dates are stored in the database in the server's timezone, which is an @@ -183,7 +183,7 @@ lang::system::timezone.. When retrieved from the database and displayed, dates and times must be localized to the user's locale. -

APM Parameters

+

APM Parameters

Some parameters contain text that need to be localized. In this case, instead of storing the real text in the parameter, you should use message keys using the short notation above,