diff jabberbot/i18n.py @ 2413:61380308535d

Added a dummy _ function so that string for translations can be gathered.
author Karol 'grzywacz' Nowak <grzywacz@sul.uni.lodz.pl>
date Tue, 17 Jul 2007 03:24:28 +0200
parents
children 1007128cb089
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jabberbot/i18n.py	Tue Jul 17 03:24:28 2007 +0200
@@ -0,0 +1,24 @@
+# -*- coding: iso-8859-1 -*-
+"""
+    MoinMoin - jabber bot i18n routines
+
+    @copyright: 2007 by Karol Nowak <grywacz@gmail.com>
+    @license: GNU GPL, see COPYING for details.
+"""
+
+translations = None
+
+def getText(original, lang="en"):
+    global translations
+    
+    if not translations:
+        init_i18n()
+
+    try:
+        return translations[lang][original]
+    except KeyError:
+        return original
+
+def init_i18n():
+    global translations
+    translations = {'en': { } }