root/gaphor/tags/gaphor-0.3.0/gaphor/i18n.py

Revision 199, 383 bytes (checked in by arjanmol, 6 years ago)

*** empty log message ***

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 # vim:sw=4:et
2 """Internationalization (i18n) support for Gaphor.
3
4 Here the _() function is defined that is used to translate text into
5 your native language.
6 """
7
8 # default locale dir = sys.prefix/share/locale/<lang>/LC_MESSAGES/gaphor.mo
9
10 __all__ = [ '_' ]
11
12 import gettext
13
14 try:
15     catalog = gettext.Catalog('gaphor')
16     _ = catalog.gettext
17 except IOError:
18     def _(s): return s
19
Note: See TracBrowser for help on using the browser.