Logo Search packages:      
Sourcecode: videomanager version File versions  Download package

def SimpleGladeApp::bindtextdomain (   app_name,
  locale_dir = None 
)

Bind the domain represented by app_name to the locale directory locale_dir.
It has the effect of loading translations, enabling applications for different
languages.

app_name:
    a domain to look for translations, tipically the name of an application.

locale_dir:
    a directory with locales like locale_dir/lang_isocode/LC_MESSAGES/app_name.mo
    If omitted or None, then the current binding for app_name is used.

Definition at line 35 of file SimpleGladeApp.py.

00035                                              :
    """    
    Bind the domain represented by app_name to the locale directory locale_dir.
    It has the effect of loading translations, enabling applications for different
    languages.

    app_name:
        a domain to look for translations, tipically the name of an application.

    locale_dir:
        a directory with locales like locale_dir/lang_isocode/LC_MESSAGES/app_name.mo
        If omitted or None, then the current binding for app_name is used.
    """    
    try:
        import locale
        import gettext
        locale.setlocale(locale.LC_ALL, "")
        gtk.glade.bindtextdomain(app_name, locale_dir)
        gettext.install(app_name, locale_dir, unicode=1)
    except (IOError,locale.Error), e:
        print "Warning", app_name, e
        __builtins__.__dict__["_"] = lambda x : x


class SimpleGladeApp:


Generated by  Doxygen 1.6.0   Back to index