Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1# i18n = i(18 letters omitted)n = internationalization
2"""Module for l10n (localization) with gettext.
4When this module is imported, ASE-GUI will use translations depending
5on system settings. Usually language is taken from the LANG or LANGUAGE
6environment variables. Examples of how to override the system locale:
8 LANG=da_DK.UTF-8 ase gui (Danish)
9 LANGUAGE=da_DK.UTF-8 ase gui (Danish; normally overrides LANG)
10 LANG=C ase gui (bare-bones ASCII locale disabling translations)
12Other languages: es_ES.UTF-8, en_UK.UTF-8, ...
14The encoding and/or country code can be omitted on most systems/languages.
16Translations will be loaded from the mo-files when possible. See ase/gui/po.
18All modules that need translations should import _ from here,
19along with ngettext if they want to translate messages with plurals
20(e.g. "Save 1 file", "Save %d files")."""
22import os
23import gettext
26domain = 'ag'
27localedir = '%s/po/' % os.path.dirname(__file__)
28translation = gettext.translation(domain, localedir, fallback=True)
31_ = translation.gettext
32ngettext = translation.ngettext