Changes between Initial Version and Version 1 of DeveloperGuidelines/Internationalisation


Ignore:
Timestamp:
07/28/09 18:45:00 (12 years ago)
Author:
Fran Boon
Comment:

Move Production stuff here from BluePrints, add Dropdowns method

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelines/Internationalisation

    v1 v1  
     1== Internationalisation ==
     2The original language of the !SahanaPy user interface, source code labels and comments, and the Wiki pages is '''English (international)'''. No contributions can be accepted without being at least translated to english. If you need help to translate your contents to english, please contact the [http://wiki.sahana.lk/doku.php?id=translate:home "Sahana Localization team"].
     3
     4However, translation to other languages is highly appreciated - please contact the Localization team for advice.
     5
     6== Web2py localization engine ==
     7 * T() function performs dictionary lookups (similar to GNU/gettext _()), see [http://mdp.cti.depaul.edu/examples/global/vars/T here] for example
     8 * the dictionaries are located in the languages subfolder of the application
     9 * dictionaries can be translated using the web2py web interface (RAD mode)
     10  * suggest increasing the timeout from the default 10 minutes: {{{python web2py.py --timeout=120 ...}}}
     11
     12To make dropdown options localisable, use this pattern:
     13db[table][field].requires = IS_IN_SET({'1':T('Option1'), '2':T('Option2')})
     14
     15All reference to the options in View code should be by Index not by string (since the string can be changed).
     16
     17== Pootle/translate toolkit and web2py dictionaries ==
     18 * [http://translate.sahana.lk "Sahana Pootle server"] as online facility for collaboration, translation refinement and workflow control
     19 * web2py translation dictionaries can be converted into PO files and vice versa, e.g. using:
     20   * [http://pub.nursix.org/translate/web2py2po.tar.gz "web2py2po"] scripts (part of the [http://translate.sourceforge.net/wiki/toolkit/py2web2po "Translate Toolkit"])
     21
     22== Wiki pages translation ==
     23 * translated pages with ISO 639-2 language code extension (original english page = no extension), e.g.
     24   * '''original page:''' trac.sahanapy.org/wiki/BluePrintInternationalisation
     25   * '''german translation:''' trac.sahanapy.org/wiki/BluePrintInternationalisation'''/de'''
     26
     27 * insert ![[TranslatedPages]] macro to display a list of available translations of a page (at best at bottom of page)
     28
     29----
     30BluePrintInternationalisation
     31
     32DeveloperGuidelines