(locale_dir)
Initialize gettext using the given directory containing the l10n data.
Initialize gettext using the given directory containing the l10n data.
Initialize gettext using the given directory containing the l10n data .
def init_gettext(locale_dir):
    '''Initialize gettext using the given directory containing the l10n data.
    '''
    gettext.bindtextdomain('sdaps', locale_dir)

    if hasattr(gettext, 'bind_textdomain_codeset'):
        gettext.bind_textdomain_codeset('sdaps', 'UTF-8')
        gettext.textdomain('sdaps')
    if hasattr(locale, 'bind_textdomain_codeset'):
        locale.bindtextdomain('sdaps', locale_dir)
        locale.bind_textdomain_codeset('sdaps', 'UTF-8')
        locale.textdomain('sdaps')
def init_gettext ( locale_dir ) : gettext . bindtextdomain ( 'sdaps' , locale_dir ) if hasattr ( gettext , 'bind_textdomain_codeset' ) : gettext . bind_textdomain_codeset ( 'sdaps' , 'UTF-8' ) gettext . textdomain ( 'sdaps' ) if hasattr ( locale , 'bind_textdomain_codeset' ) : locale . bindtextdomain ( 'sdaps' , locale_dir ) locale . bind_textdomain_codeset ( 'sdaps' , 'UTF-8' ) locale . textdomain ( 'sdaps' )