Re: i18n docs
Gregor Horvath <gh-LfrpOBifzZo+ytmZ3SK/[email protected]>
| Newsgroups | gmane.comp.python.formencode |
|---|---|
| Organization | Ing. Gregor Horvath, Industrieberatung & Softwareentwicklung |
| Message-ID | <[email protected]> |
Ian Bicking schrieb: > Can someone write some i18n docs? There doesn't seem to be anything. there are some remarks in docs/i18n.txt in SVN: FormEncode Internationalization (gettext) +++++++++++++++++++++++++++++++++++++++++ There are different translation options available: Domain "FormEncode" ^^^^^^^^^^^^^^^^^^^ for standalone use of FormEncode. The language to use is determined out of the local system (see gettext documentation http://docs.python.org/lib/node733.html). Optionally you can also set the language or the domain explicitly with the function. example: formencode.api.set_stdtranslation(domain="FormEncode", languages=["de"]) The mo files are located in the i18n subdirectory of the formencode installation. state._ ^^^^^^^ A custom _ gettext function provided as attribute of the state object. __builtins__._ ^^^^^^^^^^^^^^ A custom _ gettext function provided in the builtin namespace. This function is only used when: Validator.use_builtin_gettext == True (True is default) Without translation ^^^^^^^^^^^^^^^^^^^ If no translation mechanism is found a fallback returns the plain string. Gregor Horvath, 2006 gh-LfrpOBifzZo+ytmZ3SK/[email protected] ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV