Index: openacs-4/packages/acs-core-docs/www/xml/developers-guide/i18n.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/developers-guide/i18n.xml,v diff -u -r1.26 -r1.27 --- openacs-4/packages/acs-core-docs/www/xml/developers-guide/i18n.xml 11 Dec 2010 23:36:32 -0000 1.26 +++ openacs-4/packages/acs-core-docs/www/xml/developers-guide/i18n.xml 27 Oct 2014 16:39:30 -0000 1.27 @@ -110,7 +110,7 @@ - Localizable text must be handled in ADP files, in TCL files, and + Localizable text must be handled in ADP files, in Tcl files, and in APM Parameters. OpenACS provides two approaches, message keys and localized ADP files. For ADP pages which are mostly code, replacing the message text with message key placeholders @@ -214,7 +214,7 @@ - Message Keys in TCL Files + Message Keys in Tcl Files In adp files message lookups are typically done with the syntax @@ -247,10 +247,10 @@ - Translatable texts in page TCL scripts are often found in page titles, + Translatable texts in page Tcl scripts are often found in page titles, context bars, and form labels and options. Many times the texts are enclosed in double quotes. The following is an example of grep commands - that can be used on Linux to highlight translatable text in TCL files: + that can be used on Linux to highlight translatable text in Tcl files: # Find text in double quotes @@ -267,7 +267,7 @@ - You may mark up translatable text in TCL library files and TCL pages + You may mark up translatable text in Tcl library files and Tcl pages with temporary tags on the <#key text#> syntax. If you have a sentence or paragraph of text with variables and or procedure calls in it you should in most cases @@ -342,17 +342,17 @@ When you feel ready you may vist your package in the package manager and run the action "Replace tags with keys - and insert into catalog" on the TCL files that you've edited to + 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, + 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 APM Parameter set at @@ -513,8 +513,8 @@ - Replace human-readable text in TCL files with temporary tags - Examine all of the tcl files in the packages for human-readable text and replace it with temporary tags. The temporary tags in TCL are slightly different from those in ADP. If the first character in the temporary tag is an underscore (_), then the message keys will be auto-generated from the original message text. Here is an unmodified tcl file: + Replace human-readable text in Tcl files with temporary tags + Examine all of the tcl files in the packages for human-readable text and replace it with temporary tags. The temporary tags in Tcl are slightly different from those in ADP. If the first character in the temporary tag is an underscore (_), then the message keys will be auto-generated from the original message text. Here is an unmodified tcl file: set title "Messages for $a(name) in $b(label)" @@ -537,8 +537,8 @@ - Replace the temporary message tags in TCL files - Repeat step 2 for tcl files. Here is the example TCL file after conversion: + Replace the temporary message tags in Tcl files + Repeat step 2 for tcl files. Here is the example Tcl file after conversion: set title [_ simulation.admin_title] @@ -551,7 +551,7 @@ Internationalize SQL Code - If there is any user-visible TCL code in the .sql or .xql files, internationalize that the same way as for the TCL files. + If there is any user-visible Tcl code in the .sql or .xql files, internationalize that the same way as for the Tcl files. @@ -582,7 +582,7 @@ - In TCL files where the date fields are used, convert the datetime from local server timezone, which is how it's stored in the database, to the user's timezone for display. Do this with the localizing function lc_time_system_to_conn: + In Tcl files where the date fields are used, convert the datetime from local server timezone, which is how it's stored in the database, to the user's timezone for display. Do this with the localizing function lc_time_system_to_conn: set foo_date_ansi [lc_time_system_to_conn $foo_date_ansi] When a datetime will be written to the database, first convert it from the user's local time to the server's timezone with lc_time_conn_to_system. @@ -894,7 +894,7 @@ Be careful with curly brackets - Code within curly brackets isn't evaluated. TCL uses curly brackets as an alternative way to build lists. But TCL also uses curly brackets as an alternative to quotation marks for quoting text. So this original code + Code within curly brackets isn't evaluated. Tcl uses curly brackets as an alternative way to build lists. But Tcl also uses curly brackets as an alternative to quotation marks for quoting text. So this original code array set names { key "Pretty" ...} ... if converted to @@ -918,7 +918,7 @@ Use system locale (an APM parameter for acs_lang) default to en_US - For ADP pages, message key lookup occurs in the templating engine. For TCL pages, message key lookup happens with the _ function. In both cases, if the requested locale is not found but a locale which is the default for the language which matches your locale's language is + For ADP pages, message key lookup occurs in the templating engine. For Tcl pages, message key lookup happens with the _ function. In both cases, if the requested locale is not found but a locale which is the default for the language which matches your locale's language is found, then that locale is offered instead.