From a6d7cd1d6cbbd7135b2b89e2a5bfe6d472422747 Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Tue, 29 Feb 2000 23:57:39 +0000 Subject: add translate.py --- translate.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 translate.py (limited to 'translate.py') diff --git a/translate.py b/translate.py new file mode 100644 index 000000000..917ababd4 --- /dev/null +++ b/translate.py @@ -0,0 +1,15 @@ +import gettext_rh + +class i18n: + def __init__(self): + self.cat = gettext_rh.Catalog ("anaconda", "/usr/share/locale") + + def setlangs(self, langs): + gettext_rh.setlangs (langs) + self.cat = gettext_rh.Catalog ("anaconda", "/usr/share/locale") + + def gettext(self, string): + return self.cat.gettext(string) + +cat = i18n() +_ = cat.gettext -- cgit