Changes between Version 40 and Version 41 of UserGuidelines/Localisation
- Timestamp:
- 10/23/14 14:06:10 (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
UserGuidelines/Localisation
v40 v41 2 2 [[TOC]] 3 3 == Contributing to a Translation of Sahana Eden == 4 Translation to other languages is highly appreciated.[http://pootle.sahanafoundation.org Sahana Pootle Server] is available as on online tool used for Translations. 4 Translation to other languages is highly appreciated. 5 6 It would also be great to have someone volunteer to be our Translations lead / coordinator. 7 8 == Web2Py Localisation System == 9 Sahana Eden is built using Web2Py & as-such it inherits the Web2Py localisation architecture: 10 * http://www.web2py.com/books/default/chapter/29/04/the-core#Internationalization--and-Pluralization-with-T 11 12 NB Currently Sahana is NOT using the pluralisation functionality (help migrating to that would be appreciated!) 13 14 Current languages translated to some extent: 15 * https://github.com/flavour/eden/tree/master/languages 16 17 == Translation Tools == 18 === Sahana Translation Interface === 19 We have built our own Translation module which allows you to export the *relevant* strings to an .xls file, a .po file or upload to Pootle: 20 * http://host.domain/eden/admin/translate 21 22 It also supports uploading updated [partial] files to be merged with the existing {{{languages/code.py}}} 23 24 If the language you want isn't yet available, then create a new file using the [http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes ISO 639-1 Code] of the Language as the filename. If it is a national variation of a language, eg. New Zealand English, add a suffix to the filename: "en_nz.py". 25 26 === Pootle === 27 We maintain a [http://pootle.sahanafoundation.org Pootle Server] as a collaborative space to both do the initial translations and also to allow people to suggest improvements. 28 5 29 Please see the [UserGuidelinesLocalisationPootle Pootle User Guidelines] for instructions or contact the MailingList for advice. 6 7 == Translate Sahana Eden into a New Language ==8 === 1. Create Language File ===9 http://127.0.0.1:8000/admin/default/design/eden#languages10 11 Create a new file using the [http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes ISO 639-1 Code] of the Language as the filename. If it is a national variation of a language, eg. New Zealand English, add a suffix to the filename: "en_nz.py".12 13 === 2. Translate ===14 Sahana Eden can be translated in the following ways:15 16 ==== A. Using Pootle ====17 ''Preferred method''18 19 [http://pootle.sahanafoundation.org Sahana Pootle Server] is available as on online tool for collaboration, translation refinement and workflow control.20 * [UserGuidelinesLocalisationPootle Pootle User Guidelines]21 30 22 31 Convert to a .po file for use in Pootle (or other PO file tools such as [http://translate.sourceforge.net/wiki/virtaal/index Virtaal]): … … 44 53 See SysAdmin/Pootle 45 54 46 === = B. Using Eden Admin UI ====47 You can export the strings to an .xls file, a .po file or upload to Pootle 55 === Transifex === 56 We are also starting to try out [https://www.transifex.com/organization/sahana Transifex] to do the same job as Pootle, so if you prefer to use that then we can support you there too. 48 57 49 * http://127.0.0.1:8000/admin/translate 50 51 ==== C. Using Web2Py Admin UI ==== 52 You can then edit the language file directly in the Web2Py Admin UI. 58 === Web2Py Admin UI === 59 You can edit the language file directly in the Web2Py Admin UI. 53 60 54 61 If wishing to provide access to just language strings & not the rest of the source code: … … 61 68 }}} 62 69 63 === = D. Using Auto-Translator ====64 You can -also- try a new method, using abeta tool, which translates any file (including the web2py languages files) using the Google Translate API:70 === Using Auto-Translator === 71 You can -also- try a beta tool, which translates any file (including the web2py languages files) using the Google Translate API: 65 72 * Go to [http://pypi.python.org/pypi/auto-translator/ "Auto-Translator"], download, uncompress the .tar.gz archive 66 73 * Inside the uncompressed directory, execute the application with: … … 78 85 To remove rows where source & target are the same, can create a new column with =IF(A2=B2;1;0), Paste Special, Sort & Delete 1s 79 86 87 * http://stackoverflow.com/questions/6002256/is-it-possible-to-force-excel-recognize-utf-8-csv-files-automatically 88 1. Save the exported file as a csv 89 1. Open Excel 90 1. Import the data using Data-->Import External Data --> Import Data 91 1. Select the file type of "csv" and browse to your file 92 1. In the import wizard change the File_Origin to "65001 UTF" (or choose correct language character identifier) 93 1. Change the Delimiter to comma 94 1. Select where to import to and Finish 95 80 96 == Translate Wiki Pages == 81 97 * Translated pages with [http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes ISO 639-2 Language Code] extension (original english page = no extension), e.g. … … 88 104 * DeveloperGuidelines/Internationalisation 89 105 * BluePrint/Internationalisation 90 * http://stackoverflow.com/questions/6002256/is-it-possible-to-force-excel-recognize-utf-8-csv-files-automatically91 1. Save the exported file as a csv92 1. Open Excel93 1. Import the data using Data-->Import External Data --> Import Data94 1. Select the file type of "csv" and browse to your file95 1. In the import wizard change the File_Origin to "65001 UTF" (or choose correct language character identifier)96 1. Change the Delimiter to comma97 1. Select where to import to and Finish