i18n

RS writes that " i18n stands for that word with 'i' in front, 'n' at the end, and 18 letters in between - internationalization, adapting software to non-English language environments." Also, he provides an algorithmlet to produce such abbreviations:

 proc n2n s {
   return [string index $s 0][string length [string range $s 1 end-1]][string index $s end]
 }
 % n2n internationalization
 i18n
 % n2n localization
 l10n

AMG: I'd avoid generating the substring only to take its length:

proc n2n {s} {
    return [string index $s 0][expr {[string length $s] - 2}][string index $s end]
}

Tcl/Tk is an excellent base for i18n, with Unicode, encoding support, and Tk's automatic font finding. In another take at localization (l10n), the community has collected a number of translations of the constitutional Tcl man page - see Endekalogue.


The i18n package contains most of what RS has done in i18n so far.


i18n - writing for the world or, newer, i18n - Tcl for the world


Introduction to i18n: http://www.debian.org/doc/manuals/intro-i18n/

https://www.tcl-lang.org/doc/howto/i18n.html

See Also

  • msgcat - TCL's localization tools