1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
#!/usr/bin/python
# -*- coding: utf-8 -*-
import wx
import wxversion
import gettext, Variables as Variables, os
import locale, string
class Lang(object):
def __init__(self):
return None
class iLang(object):
def __init__(self):
languages = os.listdir('/usr/share/locale')
langid = wx.LANGUAGE_DEFAULT
localedir = "/usr/share/locale"
domain = "pol"
mylocale = wx.Locale(langid)
mylocale.AddCatalogLookupPathPrefix(localedir)
mylocale.AddCatalog(domain)
mytranslation = gettext.translation(domain, localedir, [mylocale.GetCanonicalName()], fallback = True)
mytranslation.install()
|