]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - lib/rbot/language.rb
plugin(points): +/- must come after, closes #34
[user/henk/code/ruby/rbot.git] / lib / rbot / language.rb
index ae750ad93868b6dc498c2a9b1d2fe1e7877f36ce..8055ea0e8e986ae588ff624408617daef803d0f0 100644 (file)
@@ -11,6 +11,9 @@ module Irc
 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
@@ -78,7 +81,7 @@ class Bot
       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