Commit a326ae995260c45cb1f86137a99dbe97239bed44
1 parent
b4783efa
Type: Documentation.
Description: First draft i18n doc. git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@2840 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
56 additions
and
0 deletions
docs/i18n.txt
0 → 100644
| 1 | +KnowledgeTree Internationalisation (i18n) | |
| 2 | +----------------------------------------- | |
| 3 | + | |
| 4 | +Overview | |
| 5 | +-------- | |
| 6 | +Support for i18n has been added to the KnowledgeTree- however, we are not in a position to | |
| 7 | +begin translating the KnowledgeTree until all the text and graphics in the application are marked for translation. | |
| 8 | +This is a mammoth task that will require the support and aid of the KnowledgeTree community :) | |
| 9 | + | |
| 10 | +Requirements | |
| 11 | +------------ | |
| 12 | + | |
| 13 | +i18n requires gettext (http://www.gnu.org/software/gettext) and the gettext php module to work | |
| 14 | +(see http://php.net/gettext for installation instructions). | |
| 15 | + | |
| 16 | +Completed Tasks and Implementation Details | |
| 17 | +------------------------------------------ | |
| 18 | + | |
| 19 | +- i18n/<locale>/LC_MESSAGES | |
| 20 | + /graphics | |
| 21 | + | |
| 22 | +- gettext support loaded if php module available | |
| 23 | + | |
| 24 | +- dashboard and document browse view i18n'd | |
| 25 | + | |
| 26 | +***TODO**** | |
| 27 | +- checks the browser's Accept-Language header and uses that language (if there is a translation for it) | |
| 28 | + | |
| 29 | + | |
| 30 | +The TODO List | |
| 31 | +------------- | |
| 32 | + | |
| 33 | +The rest of the KnowledgeTree needs to be i18n'd. | |
| 34 | +Here are some guidelines for adding gettext support to the KnowledgeTree. | |
| 35 | + | |
| 36 | +- find translatable strings and wrap literals with _() | |
| 37 | + eg. change: | |
| 38 | + | |
| 39 | + to: | |
| 40 | + _("Checked Out Documents") | |
| 41 | +- if strings are concatenated with dynamic content use sprintf | |
| 42 | + eg. | |
| 43 | +- add ordering to sprintf parameters- use single quotes so slashes aren't escaped in the .po files | |
| 44 | + eg. | |
| 45 | + sprintf(_('Hi %1$s, welcome back to the %2$s DMS, part of the Knowledge Tree') | |
| 46 | + | |
| 47 | +Testing | |
| 48 | +------- | |
| 49 | +- install gettext command line utilities | |
| 50 | +- run xgettext to generate .po files | |
| 51 | +- write a test translation | |
| 52 | +- use msgfmt to compile your translated file | |
| 53 | +- change the default language and verify | |
| 54 | + - you may have to specify the complete locale ie <langcode>_<countrycode> | |
| 55 | + | |
| 56 | +$Id$ | |
| 0 | 57 | \ No newline at end of file | ... | ... |