linkcheck.i18n
Application internationalization support.
Functions
|
Get wrapped output writer with given encoding and error handling. |
|
Return lang if it is supported, or the default language. |
Search the default platform locale and norm it. |
|
|
Search the appropriate GNUTranslations class. |
|
Initialize this gettext i18n module. |
|
Install _() and _n() gettext methods into default namespace. |
|
Install translation service routines into default namespace. |
|
Normalize a locale. |
Classes
|
A dummy translation class always installing its gettext methods into the default namespace. |
|
A translation class always installing its gettext methods into the default namespace. |
- class linkcheck.i18n.NullTranslator(fp=None)[source]
Bases:
gettext.NullTranslations
A dummy translation class always installing its gettext methods into the default namespace.
- class linkcheck.i18n.Translator(fp=None)[source]
Bases:
gettext.GNUTranslations
A translation class always installing its gettext methods into the default namespace.
- linkcheck.i18n.get_encoded_writer(out=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>, encoding=None, errors='replace')[source]
Get wrapped output writer with given encoding and error handling.
- linkcheck.i18n.get_locale()[source]
Search the default platform locale and norm it. :returns (locale, encoding) :rtype (string, string)
- linkcheck.i18n.get_translator(domain, directory, languages=None, translatorklass=<class 'linkcheck.i18n.Translator'>, fallback=False, fallbackklass=<class 'linkcheck.i18n.NullTranslator'>)[source]
Search the appropriate GNUTranslations class.
- linkcheck.i18n.init(domain, directory, loc=None)[source]
Initialize this gettext i18n module. Searches for supported languages and installs the gettext translator class.
- linkcheck.i18n.install_builtin(translator, do_unicode)[source]
Install _() and _n() gettext methods into default namespace.