PmWiki»Internationalizations


PmWiki supports internationalization (internationalisation) of web pages, allowing accented characters to appear in page names and almost complete customization of PmWiki's prompts. Most customization is provided via the XLPage() function in PmWiki, which loads a set of translation variables from a wiki page (typically named XLPage, but it can be named anything you wish).

Loading Translation Pages

Pages for many languages such as French, German, Dutch, and Spanish have already been created and maintained at the pmichaud.com site. You can download an archive of these translations from http://www.pmichaud.com/pub/pmwiki/i18n.tgz. Simply unpack the archive into the directory containing your pmwiki.php installation. The archive contains a number of page files that are placed in your wikilib.d/ directory, and some special scripts for translations that use a character set other than iso-8859-1 (PmWiki's default).

Once the translation pages are installed, you enable a language by adding a call to XLPage() in your config.php file. For example, to select French language prompts, one would specify

XLPage('fr','PmWikiFr.XLPage');

which says to load the translations for French ('fr') from the page PmWikiFr.XLPage. It's perfectly okay to load multiple pages; so if you want to create your own local translations without changing the ones you got from i18n.tgz, just create another page (see below) and load it on top. Be sure that you load first the page with your local chances:

XLPage('fr','PmWikiFr.XLPageLocal');  # my local translations
XLPage('fr','PmWikiFr.XLPage');       # from i18n.tgz