From the [msgcat] [TclHelp]: LOCALE AND SUBLOCALE SPECIFICATION The locale is specified by a locale string. The locale string consists of a language code, an optional country code, and an optional system-specific code, each separated by "_". The country and language codes are specified in standards ISO-639 and ISO-3166. For example, the locale "en" specifies English and "en_US" specifies U.S. English. The locale defaults to the value in env(LANG) at the time the msgcat package is loaded. If env(LANG) is not defined, then the locale defaults to "C". When a locale is specified by the user, a "best match" search is performed during string translation. For example, if a user specifies en_UK_Funky, the locales "en_UK_Funky", "en_UK", and "en" are searched in order until a matching translation string is found. If no translation string is available, then ::msgcat::unknown is called. ---- [RS] offers an example of locale-use in Tcl programming: proc monthname {date} { if ![info exists ::env(LANG)] {set ::env(LANG) "C"} set index $::env(LANG) if ![info exists ::monthnames($index)] {set index "C"} lindex $::monthnames($index) [clock format $date -format -m] } # These lists indexed by locale must have a dummy first argument # set monthnames(C) {- January February March April...} set monthnames(de_AT) {- J�nner Feber M�rz April ...} ... ---- Victor Wagner has a locale patch [http://www.ice.ru/~vitus/tcl]. ---- A special kind of locale setting, the rendering of the decimal point, is expressed by the environment variable LC_NUMERIC (where set). But if it set to a value incompatible with the default "C", it may cause parsing problems for [expr], witness this exchange on [the comp.lang.tcl newsgroup]: Stefan Bruder: I have extended my TCL with SWIG to connect to a ORACLE database. Now I have a problem with expr command. The command expr 1000.0 + 1.0 works fine before calling the connect function to the database. After connecting the same command gives an error: syntax error in expression 1000.0 Debugging the code gives me the problem in the function "strtod", the function return the double 1000.0 and the rest ".0" the locale var's LC_NUMERIC is always "." after calling the database function, but later on in the TCL code it must be changed to ",". [Jeffrey Hobbs]: Somehow the LC_NUMERIC locale has changed from C (or other compatible locale) to a European one which switches the meaning of , and . in numbers. Tcl requires operation in the LC_NUMERIC C locale. ---- [i18n - Writing for the world] - [Arts and crafts of Tcl-Tk programming]