gettext errors with wxPython in linux

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ianaré

    #1

    gettext errors with wxPython in linux

    given the foolowing code:

    import gettext
    gettext.install ('messages', './locale', unicode=0)

    <snip>

    def __init__(self, parent):
    # initialise preferences
    self.prefs = self.getPrefs()

    # initialise language:
    language = self.prefs['language=']
    langdir = self.realPath(' ./locale')
    Lang = gettext.transla tion(domain='me ssages',
    localedir=langd ir, languages=[language])
    Lang.install()

    <snip>

    # return full path:
    def realPath(self, file):
    return os.path.join(sy s.path[0],file)
    .....

    and using following structure:
    application_fol der/locale/fr/LC_MESSAGES/messages.mo

    works fine in windows2k, XP, however under linux:
    IOError: [Errno 2] No translation file found for domain: 'messages'

    what gives? thanks.

Working...