lang::util::iso6392_from_language (public)
lang::util::iso6392_from_language -language language
Defined in packages/acs-lang/tcl/lang-util-procs.tcl
Returns the ISO-639-2 code for a language.
- Switches:
- -language (required)
- Language, using ISO-639 code (2 or 3 chars)
- Returns:
- The ISO-639-2 terminology code for the language
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- test_get_locales
Source code: set iso6392_code "" set lang_len [string length $language] if { $lang_len == 2 } { # input is iso-639-1 language code set iso6392_code [db_string get_iso2_code_from_iso1 {} -default ""] } elseif { $lang_len == 3 } { # input is iso-639-2 language code # we check in the table in case the language code is wrong set iso6392_code [db_string get_iso2_code_from_iso2 {} -default ""] } return $iso6392_codeXQL Not present: PostgreSQL, Oracle Generic XQL file: <fullquery name="lang::util::iso6392_from_language.get_iso2_code_from_iso1"> <querytext> select iso_639_2 from language_639_2_codes where iso_639_1 = :language </querytext> </fullquery> <fullquery name="lang::util::iso6392_from_language.get_iso2_code_from_iso2"> <querytext> select iso_639_2 from language_639_2_codes where iso_639_2 = :language </querytext> </fullquery>packages/acs-lang/tcl/lang-util-procs.xql