Line 28: |
Line 28: |
| | | |
| ====HTML Strings==== | | ====HTML Strings==== |
− | We will try to use the [http://en.wikipedia.org/wiki/Internationalization_Tag_Set Internationalization Tag Set] for handling strings inline with html. The [http://okapi.sourceforge.net/ Okapi] tool may be able to parse out strings marked with ITS.
| |
| | | |
− | There is first attempt at internationalizing html without using ITS. It will be in git under karma/i18n.
| + | The Python library [http://www.hforge.org/itools itools] automates the job of parsing the HTML and creating the PO files. There are already concrete experiments, which you can find [http://git.olenepal.org/~km0r3/karma/km0r3-karma/commits/experimental here]. |
− | * You annotate the tags of elements that need translation with a class attribute: class="translate".
| |
− | * i18n/html2po.py is the equivalent of xgettext for html.
| |
− | * i18n/translate-html.py translates an html page.
| |
| | | |
− | Have a look at karma/i18n/example for an example.
| + | Things which still need to be done: |
| + | * Dynamically change out strings per locale on page load (HIGH PRIORITY) |
| + | * A well-defined workflow |
| + | * integrate the JavaScript i18n within the workflow. |
| + | * Documentation. |
| | | |
− | The following is no longer true (translate-html.py generates a static translated html page), but can be implemented if needed:
| + | I'm still actively working on it. Questions, comments, suggestions > km0r3 AT sugarlabs DOT org . |
− | * For the immediate future we will dynamically change out strings per locale on page load
| |