class Bot
class Language
+ # Access needed for tests:
+ attr_reader :strings
+
# This constant hash holds the mapping
# from long language names to the usual POSIX
# locale specifications
:dutch => 'nl',
:japanese => 'ja',
:russian => 'ru',
+ :finnish => 'fi',
:traditional_chinese => 'zh_TW',
:simplified_chinese => 'zh_CN'
}
lang_str = language.to_s.downcase.gsub(/\s+/,'_')
lang_sym = lang_str.intern
if defined?(GetText) and Lang2Locale.key?(lang_sym)
- setlocale(Lang2Locale[lang_sym])
+ GetText.set_locale(Lang2Locale[lang_sym])
debug "locale set to #{locale}"
rbot_gettext_debug
else