Index: openacs-4/packages/acs-lang/catalog/acs-lang.da_DK.ISO-8859-1.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/catalog/acs-lang.da_DK.ISO-8859-1.xml,v
diff -u -r1.13 -r1.14
--- openacs-4/packages/acs-lang/catalog/acs-lang.da_DK.ISO-8859-1.xml 12 Mar 2004 13:45:04 -0000 1.13
+++ openacs-4/packages/acs-lang/catalog/acs-lang.da_DK.ISO-8859-1.xml 10 May 2004 17:58:55 -0000 1.14
@@ -36,5 +36,6 @@
%H:%M
.
+ dansk
Spansk
Index: openacs-4/packages/acs-lang/catalog/acs-lang.de_DE.ISO-8859-1.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/catalog/acs-lang.de_DE.ISO-8859-1.xml,v
diff -u -r1.15 -r1.16
--- openacs-4/packages/acs-lang/catalog/acs-lang.de_DE.ISO-8859-1.xml 12 Mar 2004 13:45:04 -0000 1.15
+++ openacs-4/packages/acs-lang/catalog/acs-lang.de_DE.ISO-8859-1.xml 10 May 2004 17:58:55 -0000 1.16
@@ -36,5 +36,6 @@
%H:%M
.
+ Deutsche
Spanisch
Index: openacs-4/packages/acs-lang/catalog/acs-lang.en_US.ISO-8859-1.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/catalog/acs-lang.en_US.ISO-8859-1.xml,v
diff -u -r1.18 -r1.19
--- openacs-4/packages/acs-lang/catalog/acs-lang.en_US.ISO-8859-1.xml 9 May 2004 14:57:57 -0000 1.18
+++ openacs-4/packages/acs-lang/catalog/acs-lang.en_US.ISO-8859-1.xml 10 May 2004 17:58:55 -0000 1.19
@@ -8,7 +8,7 @@
English
French
German
- Locale for %package_name%
+ Locale for $package_name
{Sun} {Mon} {Tue} {Wed} {Thu} {Fri} {Sat}
{Jan} {Feb} {Mar} {Apr} {May} {Jun} {Jul} {Aug} {Sep} {Oct} {Nov} {Dec}
AM
@@ -55,7 +55,7 @@
Spanish
English
Translated messages on this page (%locale%)
- Your locale setting for %package_name%. If set, this will override the site-wide setting in this particular application.
+ Your locale setting for $package_name. If set, this will override the site-wide setting in this particular application.
Your locale setting for the whole site
Your Preferred Locale
Your Timezone
Index: openacs-4/packages/acs-lang/catalog/acs-lang.es_ES.ISO-8859-1.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/catalog/acs-lang.es_ES.ISO-8859-1.xml,v
diff -u -r1.15 -r1.16
--- openacs-4/packages/acs-lang/catalog/acs-lang.es_ES.ISO-8859-1.xml 12 Mar 2004 13:45:04 -0000 1.15
+++ openacs-4/packages/acs-lang/catalog/acs-lang.es_ES.ISO-8859-1.xml 10 May 2004 17:58:55 -0000 1.16
@@ -35,5 +35,6 @@
+
%H:%M
.
+ Espa�ol
Espa�ol
Index: openacs-4/packages/acs-lang/lib/change-locale-bar.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/lib/change-locale-bar.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-lang/lib/change-locale-bar.adp 10 May 2004 17:58:56 -0000 1.1
@@ -0,0 +1,12 @@
+
+
+ @locale_list.l10n_label@
+
+
+ @locale_list.l10n_label@
+
+
+
+ @change_locale_text@
+
+
Index: openacs-4/packages/acs-lang/lib/change-locale-bar.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/lib/Attic/change-locale-bar.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-lang/lib/change-locale-bar.tcl 10 May 2004 17:58:56 -0000 1.1
@@ -0,0 +1,69 @@
+# Optional parameters
+# TODO:
+# 1) specify exactly which locales
+# 2) sort by descending popularity
+
+set current_locale [lang::conn::locale]
+set base_lang_url [site_node::get_package_url -package_key acs-lang]
+
+if { ![exists_and_not_null return_url]} {
+ # Use referer header
+ set return_url [ad_conn url]
+}
+
+if { ![exists_and_not_null max_locales]} {
+ set max_locales 8
+}
+
+if { ![exists_and_not_null avail_key] } {
+ set avail_key "this-language"
+}
+
+# get a list of valid locales
+set enabled_locale_count [db_string enabled_locale_count "
+ select count(*)
+ from enabled_locales el
+" -default 0]
+
+# get a list of valid locales
+db_multirow -extend {l10n_label switch_url} locale_list get_locale_list "
+ select el.label,
+ el.locale,
+ (select count(*)
+ from user_preferences
+ where locale = el.locale) as user_count
+ from enabled_locales el
+ where (select count(*)
+ from lang_messages
+ where message_key = :avail_key
+ and locale = el.locale) > 0
+ order by user_count desc
+ limit $max_locales
+" {
+ set l10n_label [lang::message::lookup $locale acs-lang.${avail_key} "" "" 0]
+ set switch_url [export_vars -base ${base_lang_url}change-locale {{return_p "t"} {user_locale $locale} return_url}]
+}
+
+set switchable_count [template::multirow size locale_list]
+
+# display as many choices as possible, limited by availability of the localized message keys
+# and parameterized limit
+# If there are more locales in the system than displayable, extend the list with "Change Locale"
+# in the browser's requested locale. If that is not available, fall back to "...", NOT to the
+# system default for "Change Locale". The reason is that, after a list of language names, "..." should
+# be more recognizable than a foreign word
+
+if {$enabled_locale_count > $switchable_count && $enabled_locale_count > 1} {
+ set change_locale_url [export_vars -base $base_lang_url {return_url}]
+ set browser_locale [lang::conn::browser_locale]
+ set exists_p [lang::message::message_exists_p $browser_locale acs-lang.change-locale]
+ if { [exists_and_not_null browser_locale] && $exists_p } {
+ set change_locale_text "[lang::message::lookup $browser_locale acs-lang.change-locale]"
+ } else {
+ set change_locale_text "..."
+ }
+ set change_locale_text
+} else {
+ set change_locale_url ""
+ set change_locale_text ""
+}