Changes between Initial Version and Version 1 of DeveloperGuidelines/Internationalisation

07/28/09 18:45:00 (12 years ago)
Fran Boon

Move Production stuff here from BluePrints, add Dropdowns method


  • 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 [ "Sahana Localization team"].
     4However, translation to other languages is highly appreciated - please contact the Localization team for advice.
     6== Web2py localization engine ==
     7 * T() function performs dictionary lookups (similar to GNU/gettext _()), see [ 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 --timeout=120 ...}}}
     12To make dropdown options localisable, use this pattern:
     13db[table][field].requires = IS_IN_SET({'1':T('Option1'), '2':T('Option2')})
     15All reference to the options in View code should be by Index not by string (since the string can be changed).
     17== Pootle/translate toolkit and web2py dictionaries ==
     18 * [ "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   * [ "web2py2po"] scripts (part of the [ "Translate Toolkit"])
     22== Wiki pages translation ==
     23 * translated pages with ISO 639-2 language code extension (original english page = no extension), e.g.
     24   * '''original page:'''
     25   * '''german translation:''''''/de'''
     27 * insert ![[TranslatedPages]] macro to display a list of available translations of a page (at best at bottom of page)