Gnumed.pycommon.gmI18N

Package Gnumed :: Package pycommon :: Module gmI18N |
[frames] | no frames]

# Module gmI18N

source code

Author: H. Herb <hherb@gnumed.net>, I. Haywood <i.haywood@ugrad.unimelb.edu.au>, K. Hilbert <Karsten.Hilbert@gmx.net>

License: GPL v2 or later (details at http://www.gnu.org)

Functions
activate_locale() Get system locale from environment. | source code
install_domain(domain=None, language=None, prefer_local_catalog=False) Install a text domain suitable for the main script. | source code
get_encoding() Try to get a sane encoding. | source code

Variables
| __doc__ = `"""GNUmed client internationalization/localizati`...``
| system_locale = `''`
| system_locale_level = `{}`
| __orig_tag__ = `'Translate this or i18n into <en_EN> will not w`...``

Imports: sys, os, locale, gettext, logging, codecs, builtins, regex

Function Details

### get_encoding() | source code
Try to get a sane encoding. On MaxOSX locale.setlocale(locale.LC_ALL, '') does not have the desired effect, so that locale.getlocale()[1] still returns None. So in that case try to fallback to locale.getpreferredencoding(). <sys.getdefaultencoding()> what Python itself uses to convert string <-> unicode when no other encoding was specified ascii by default can be set in site.py and sitecustomize.py <locale.getlocale()[1]> what the current locale is *actually* using as the encoding for text conversion <locale.getpreferredencoding()> what the current locale would *recommend* using as the encoding for text conversion

Variables Details

  ### __doc__ Value:
      """GNUmed client internationalization/localization.

      All i18n/l10n issues should be handled through this modules.

      Theory of operation:

      To activate proper locale settings and translation services you need t
      o
      ...

  ### __orig_tag__ Value:
      'Translate this or i18n into <en_EN> will not work properly !'