OpenACS I10n

This package provides internationalization ("i18n" = "i" + 18 characters + "n) services for the OpenACS base system. I18n services include:

  • Locale management per user and for the entire system
  • Definition of text "keys"
  • Translation of keys
  • Translation GUI, including the main localization page.

Package Documentation

Internationalization and Localization Overview
How Internationalization/Localization works in OpenACS
How to Internationalize a Package
Design Notes
Translator's Guide


 

Package Documentation 

Procedure Files

lib/change-locale-bar.adp        
lib/change-locale-bar.tcl        
lib/conflict-link.adp        
lib/conflict-link.tcl        
lib/messages-to-translate.adp        
lib/messages-to-translate.tcl        
tcl/apm-callback-procs.tcl       APM callbacks library 
tcl/lang-audit-procs.tcl       Auditing of lang_messages 
tcl/lang-catalog-procs.tcl       <p> Routines for importing/exporting messages from/to XML message catalog files. 
tcl/lang-install-procs.tcl       Support procedures for install.xml actions. 
tcl/lang-message-procs.tcl       Routines for displaying web pages in multiple languages <p> This is free software distributed under the terms of the GNU Public License. 
tcl/lang-util-procs.tcl       Utility routines for translating pages. 
tcl/lang-widget-procs.tcl       Widgets for acs-lang. 
tcl/locale-procs.tcl       Localization procedures for OpenACS <p> This is free software distributed under the terms of the GNU Public License. 
tcl/localization-procs.tcl       Routines for localizing numbers, dates and monetary amounts <p> This is free software distributed under the terms of the GNU Public License. 

Procedures

_       Short hand proc that invokes the lang::message::lookup proc. 
_mr       Registers a message in a given locale or language. 
ad_locale_get_label       Returns the label (name) of locale To be removed in 5.3 
clock_to_ansi       Convert a time in the Tcl internal clock seeconds format to ANSI format, usable by lc_time_fmt. 
lang::audit::changed_message       Save a message that is overwritten. 
lang::catalog::export       Exports I18N messages from the database to XML catalog files. 
lang::catalog::import       Import messages from catalog files to the database. 
lang::catalog::package_delete       Unregister the I18N messages for the package. 
lang::conn::charset       Returns the MIME charset name corresponding to the current connection's locale. 
lang::conn::language       Get the language for this request, perhaps for a given package instance. 
lang::conn::locale       Get the locale for this request, perhaps for a given package instance. 
lang::conn::timezone       Get this connection's timezone. 
lang::message::check       <p> Check a message for semantic and sanity correctness (usually called just before a message is registered). 
lang::message::conflict_count       Return the number of messages with conflicts (conflict_p=t) resulting from catalog imports. 
lang::message::delete       Deletes a message in a particular locale. 
lang::message::get       Get all properties of a message in a particular locale. 
lang::message::get_element       Get value of a single attribute of a message. 
lang::message::lookup       This proc is normally accessed through the _ procedure. 
lang::message::message_exists_p       Return 1 if message exists in given locale, 0 otherwise. 
lang::message::register       <p> Registers a message for a given locale and package. 
lang::message::revert       Revert a message to the last overwritten version of it, i.e. 
lang::message::unregister       Unregisters a message key, i.e. 
lang::message::update_description        
lang::system::get_locale_options       Return all enabled locales in the system in a format suitable for the options argument of a form. 
lang::system::get_locales       Return all enabled locales in the system. 
lang::system::language       Get system language setting for a given package instance. 
lang::system::locale       Get system locale setting for a given package instance. 
lang::system::locale_set_enabled       Enables or disables a locale. 
lang::system::package_level_locale        
lang::system::set_locale       Set system locale setting for a given package instance, or the site-wide system locale. 
lang::system::set_timezone       Tell OpenACS what timezone we think it's running in. 
lang::system::site_wide_locale       Get the site wide system locale setting. 
lang::system::timezone       Ask OpenACS what it thinks our timezone is. 
lang::system::timezone_utc_offset        
lang::system::use_package_level_locales_p       Returns whether we're using package level locales. 
lang::user::language       Get user language preference for a given package instance. 
lang::user::locale       Get user locale preference for a given package instance. 
lang::user::package_level_locale       Get the user's preferred package level locale for a package given by its package id. 
lang::user::set_locale       Set user locale setting for a given package instance. 
lang::user::set_timezone       Set the user's timezone setting. 
lang::user::site_wide_locale       Get the user's preferred site wide locale. 
lang::user::timezone       Get the user's timezone. 
lang::util::charset_for_locale       Returns the MIME charset name corresponding to a locale. 
lang::util::convert_to_i18n       Internationalising of Attributes. 
lang::util::default_locale_from_lang       Returns an enabled default locale for a language. 
lang::util::edit_lang_key_url        
lang::util::get_label       Returns the label (name) of locale 
lang::util::get_locale_options       Return a list of locales know to the system 
lang::util::get_temporary_tags_indices       Given the contents of an adp file return the indices of the start and end chars of embedded message keys on the syntax: <#package_key.message_key Some en_US text#> 
lang::util::iso6392_from_language       Returns the ISO-639-2 code for a language. 
lang::util::iso6392_from_locale       Returns the ISO-639-2 code for a locale. 
lang::util::lang_sort       Each locale can have a different alphabetical sort order. 
lang::util::language_label       Returns the ISO-639 label for a language code. 
lang::util::localize       Takes a string with embedded message keys on the format #message_key_name# and returns the same string but with the message keys (and their surrounding hash marks) replaced with the corresponding value in the message catalog. 
lang::util::localize_list_of_lists       localize the elements of a list_of_lists 
lang::util::message_tag_regexp       The regexp expression used by proc get_temporary_tags_indices and elsewhere to extract temporary message catalog tags (<#...#>) from ADP and Tcl files. 
lang::util::nls_language_from_language       Returns the nls_language name for a language 
lang::util::replace_adp_text_with_message_tags       Prepares an .adp-file for localization by inserting temporary hash-tags around text strings that looks like unlocalized plain text. 
lang::util::replace_temporary_tags_with_lookups       Modify the given ADP or Tcl files by replacing occurencies of message keys with message lookups (i.e. 
lang::util::translator_mode_p       Whether translator mode is enabled for this session or not. 
lang::util::translator_mode_set       Sets whether translator mode is enabled for this session or not. 
lc_get       Get a certain format string for the current locale. 
lc_list_all_timezones        
lc_numeric       Given a number and a locale return a formatted version of the number for that locale. 
lc_parse_number       Converts a number to its canonical representation by stripping everything but the decimal seperator and triming left 0's so it won't be octal. 
lc_time_conn_to_system       Converts a date from the connection's timezone to the system (database) timezone, using the OpenACS timezone setting and user's preference 
lc_time_fmt       Formats a time for the specified locale. 
lc_time_fmt_compile       Compiles ISO 14652 LC_TIME style formatting string to variable substitions and proc calls. 
lc_time_local_to_utc       Converts a local time to a UTC time for the specified timezone. 
lc_time_system_to_conn       Converts a date from the system (database) to the connection's timezone, using the OpenACS timezone setting and user's preference 
lc_time_tz_convert       Converts a date from one timezone to another. 
lc_time_utc_to_local       Converts a Universal Time to local time for the specified timezone. 
template::widget::select_locales       Generate a select widget for locales. 

SQL Files

sql/postgresql/acs-lang-create.sql        
sql/postgresql/acs-lang-drop.sql        
sql/postgresql/ad-locales-drop.sql        
sql/postgresql/ad-locales.sql        
sql/postgresql/message-catalog-drop.sql        
sql/postgresql/message-catalog.sql        
sql/postgresql/upgrade/upgrade-4.1-4.7d2.sql        
sql/postgresql/upgrade/upgrade-4.7d2-4.7d3.sql        
sql/postgresql/upgrade/upgrade-4.7d3-4.7d4.sql        
sql/postgresql/upgrade/upgrade-4.7d4-4.7d5.sql        
sql/postgresql/upgrade/upgrade-4.7d6-4.7d7.sql        
sql/postgresql/upgrade/upgrade-4.7d7-4.7d8.sql        
sql/postgresql/upgrade/upgrade-4.7d8-4.7d9.sql        
sql/postgresql/upgrade/upgrade-4.7d9-5.0d1.sql        
sql/postgresql/upgrade/upgrade-5.0.0-5.0.1.sql        
sql/postgresql/upgrade/upgrade-5.0.0b4-5.0.0b5.sql        
sql/postgresql/upgrade/upgrade-5.0d1-5.0d2.sql        
sql/postgresql/upgrade/upgrade-5.0d2-5.0d3.sql        
sql/postgresql/upgrade/upgrade-5.1.1d1-5.1.1d2.sql        
sql/postgresql/upgrade/upgrade-5.1.2d2-5.1.2d3.sql        
sql/postgresql/upgrade/upgrade-5.2.3d1-5.2.3d2.sql        
sql/postgresql/upgrade/upgrade-5.3.0d1-5.3.0d2.sql        
sql/postgresql/upgrade/upgrade-5.4.1d1-5.4.1d2.sql        
sql/postgresql/upgrade/upgrade-5.4.1d2-5.4.1d3.sql        
sql/postgresql/upgrade/upgrade-5.6.0d1-5.6.0d2.sql        
sql/postgresql/upgrade/upgrade-5.6.0d2-5.6.0d3.sql        

Content Pages

www/
     admin/
           audit-include.adp
           audit-include.tcl
           batch-editor.adp
           batch-editor.tcl A quick and dirty batch editor for translation.
           edit-description.adp
           edit-description.tcl Edit description of message key.
           edit-history.adp
           edit-history.tcl A page displaying recent editing of translations.
           edit-localized-message.adp
           edit-localized-message.tcl Displays the localized message from the database for translation (displays an individual message)
           export-locale-to-files.adp
           export-locale-to-files.tcl Export all catalog messages for a given locale to the file system.
           export-messages.adp
           export-messages.tcl Export messages from the database to catalog files.
           import-locale-from-files.adp
           import-locale-from-files.tcl Import all catalog messages for a given locale from the file system.
           import-messages.adp
           import-messages.tcl Import messages from catalog files to the database.
           index.adp
           index.tcl Administration of the localized messages
           load-catalog-files.tcl Load all catalog files.
           locale-delete.adp
           locale-delete.tcl Deletes a locale
           locale-edit.adp
           locale-edit.tcl Edits a locale
           locale-make-default.tcl Makes a locale the default for its language
           locale-new.adp
           locale-new.tcl Creates a new locale
           locale-set-enabled-p.tcl Sets enabled_p for a locale.
           locales-tabs.adp
           localized-message-new.adp
           localized-message-new.tcl Displays the form for the creation of a new localized message.
           lookup.adp
           lookup.tcl Test message lookup
           lookups-include.adp
           lookups-include.tcl
           message-conflict-resolve.tcl Mark conflict of an I18N message as resolved, i.e.
           message-conflict-revert.tcl Revert the a message to the last overwritten version.
           message-conflicts.adp
           message-conflicts.tcl Show message conflicts resulting from message catalog imports.
           message-delete.adp
           message-delete.tcl Delete a message
           message-list.adp
           message-list.tcl Displays messages for translation
           message-search.adp
           message-search.tcl Search for localized messages containing a certain substring, in order to help translators ensure consistent terminology.
           message-usage-include.adp
           message-usage-include.tcl
           package-list.adp
           package-list.tcl Displays packages that contain messages.
           reload-cache.tcl Load all catalog files.
           set-system-timezone.adp
           set-system-timezone.tcl Set the acs-lang system parameter which says what the local timezone offset is
          test/
                catalog-test.adp
                catalog-test.tcl Tests procedures in the lang package
                compile.tcl
                format-test.adp
                format-test.tcl Tests procedures in the lang package
                show-catalog.adp
                show-catalog.tcl List contents of message catalog
                show.tcl
                test.adp
                test.tcl Tests procedures in the lang package
                timezone.adp
                timezone.tcl Tests procedures in the lang package
                translator-mode.adp
                translator-mode.tcl Testing translator mode.
                tz-test.tcl Test system timezone offset mechanism
           translator-mode-toggle.tcl Toggle translator mode on/off.
      change-locale-include.adp
      change-locale-include.tcl
      change-locale.tcl
      index.adp
      index.tcl Localization home
      locale-set.tcl Sets a locale for the browser

 

  Contact Us
  Project Open Business Solutions S.L.

Calle Aprestadora 19, 12o-2a

E-08907 Hospitalet de Llobregat (Barcelona)

 Tel Europe: +34 932 202 088
 Tel US: +1 415 429 5995
 Mail: info@project-open.com