From 8c05657c586e5ee75651210963cf3c10a01afc16 Mon Sep 17 00:00:00 2001 From: "N.N." Date: Sun, 17 May 2009 04:53:51 +0000 Subject: adding language "auto" in the GUI svn path=/trunk/; revision=11421 --- desiredata/src/locale/index.tcl | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'desiredata/src/locale/index.tcl') diff --git a/desiredata/src/locale/index.tcl b/desiredata/src/locale/index.tcl index 9b1fcfcb..a06e6513 100644 --- a/desiredata/src/locale/index.tcl +++ b/desiredata/src/locale/index.tcl @@ -4,7 +4,7 @@ say deutsch "Deutsch" say catala "Català" say espanol "Español" say portugues "Português" -say brasileiro "Português Do Brasil" +say brasileiro "Português do Brasil" say italiano "Italiano" say euskara "Euskara" say bokmal "Norsk Bokmål" @@ -25,3 +25,27 @@ set ::langoptions { italiano euskara bokmal dansk nederlands turkce polski russkij chinese nihongo } + +proc figure_out_language {language} { + switch -regexp -- $language { + ^(en|english)$ {list iso8859-1 english} + ^(fr|francais)$ {list iso8859-1 francais} + ^(de|deutsch)$ {list iso8859-1 deutsch} + ^(ca|catala)$ {list iso8859-1 catala} + ^(es|espanol)$ {list iso8859-1 espanol} + ^(pt|portugues)$ {list iso8859-1 portugues} + ^(it|italiano)$ {list iso8859-1 italiano} + ^(nb|bokmal)$ {list iso8859-1 bokmal} + ^(ch|chinese)$ {list utf-8 chinese} + ^(eu|euskara)$ {list iso8859-1 euskara} + ^(eo|esperanto)$ {list utf-8 esperanto} + ^(pl|polski)$ {list utf-8 polski} + ^(dk|dansk)$ {list iso8859-1 dansk} + ^(ja|nihongo)$ {list iso8859-1 nihongo} + ^(br|brasileiro)$ {list iso8859-1 brasileiro} + ^(tr|turkce)$ {list utf-8 turkce} + ^(nl|nederlands)$ {list iso8859-1 nederlands} + ^(ru|russkij)$ {list utf-8 russkij} + default {error "unknown language: $language"} + } +} -- cgit v1.2.1