Hi,
With customers both in mainland China and ROC (Taiwan = Republic of China) we've got both zhCN and zhTW enabled.
With this configuration the following call fails with "Query returned more than one row", because
lang::util::defaultlocalefrom_lang zh
SQL:
select locale
from ad_locales
where language = 'zh'
and enabled_p = 't'
and (default_p = 't' or
(select count(*)
from ad_locales
where language = 'zh') = 1
)
while executing
"ns_pg_bind 0or1row nsdb0 {
select locale
from ad_locales
where language = 'zh'
and enabled_p = 't'
and ..."
("uplevel" body line 1)
invoked from within
"uplevel $ulevel [list ns_pg_bind $type $db $sql]"
invoked from within
"db_exec 0or1row $db $full_name $sql"
("uplevel" body line 2)
invoked from within
"uplevel 1 $code_block "
invoked from within
"db_with_handle -dbn $dbn db {
set selection [db_exec 0or1row $db $full_name $sql]
}"
(procedure "::nsf::procs::db_string" line 27)
invoked from within
"db_string default_locale_from_lang {} -default """
(procedure "lang::util::default_locale_from_lang_not_cached" line 6)
invoked from within
"lang::util::default_locale_from_lang_not_cached zh"
invoked from within
"ns_cache_eval {*}$max_age -- util_memoize $script {*}$script"
(procedure "util_memoize" line 5)
invoked from within
"util_memoize [list lang::util::default_locale_from_lang_not_cached $language]"
Cheers
Frank