]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - locale/README
Did find-grep to replace all occurances of FrontPage to HomePage.
[SourceForge/phpwiki.git] / locale / README
1
2 Phpwiki can be localized and use different languages.
3
4 If you would like to use one of supported languages, then
5 just go to lib/config.php and set the language to use there.
6
7 This README describes how to add support for a new language.
8
9
10 Let's assume you would like to support Islandic (code 'is').
11
12 Just copy locale/po/phpwiki.pot to locale/po/is.po.
13 Then, translate all the strings inside is.po to Islandic.
14 See the other *.po files as example if you are uncertain about the
15 syntax. Hint: Emacs has a handy po translation mode for you.
16
17
18 Most of the work, though, is in translating the pgsrc and template
19 files.  Do the following:
20
21     mkdir locale/is
22     cp -rv pgsrc locale/is
23     cp -rv templates locale/is
24
25 Note: it is more important to translate the templates than to translate
26 the pgsrc/ files. For the pgsrc/ files it is sufficient to change their
27 names to Islandic and maybe translate the HomePage (or how it is
28 called in Islandic). Again, for anything you don't know, look at the
29 `nl' or `de' versions.
30
31
32 After you have finished translating, you may want to check the result
33 of your efforts.
34
35 First you need to modify locale/translate.sh
36 Add Islandic to the variable ALL_LINGUAS like this:
37         ALL_LINGUAS="nl es de is"
38
39 Then (from the main directory where index.php resides) run:
40
41     ./locale/translate.sh
42
43 which generates all necessary files**.
44 If this step fails, because you don't have the necessary software
45 installed, then just send your files to one of the phpwiki developers
46 and we run translate.sh for you.
47
48
49 Next edit ./lib/config.php and change the line that sets $LANG to
50 make phpwiki use your language, e.g.  make them look like this:
51
52    //  Select your language - default language "C": English
53    // other languages available: Dutch "nl", Spanish "es", German "de"
54    // $LANG="C";
55    $LANG="is";
56
57 Phpwiki should now speak Islandic.
58
59
60 If you're unfamiliar with GNU gettext and po files, you may find some
61 information at http://www.iro.umontreal.ca/contrib/po/HTML/
62
63 If you succeed, you may also want to add instructions to this
64 translation README for phpwiki ;-)
65
66 Good luck,
67 Jan Nieuwenhuizen <janneke@gnu.org>
68 Arno Hollosi <ahollosi@mail.com>
69
70
71
72 **)translate.sh is a simple script that tries to replace the usual
73    `make po po-update'.  It actually does these things:
74
75    * make the .pot file up to date
76    * merge differences into all translated .po files
77    * generate .mo files
78    * generate legacy php3 translation dictionary [this is the hairiest
79      part and should be dropped when we drop php3 support]