[pmwiki-users] i18n and iso-8859-13
jo at durchholz.org
Wed Mar 30 04:38:51 CST 2005
Algis Kabaila wrote:
> After downloading the Pm's i18n.tgz and expanding it, I "doctored" the
> iso-8859-9 implementation, renaming it xlpage-iso-8859-16.php. The contents
> of this "doctored" file is as follows:
> <?php if (!defined('PmWiki')) exit();
> /* Copyright 2005 Patrick R. Michaud (pmichaud at pobox.com)
> This file is part of PmWiki; you can redistribute it and/or modify
> it under the terms of the GNU General Public License as published
> by the Free Software Foundation; either version 2 of the License, or
> (at your option) any later version. See pmwiki.php for full details.
> global $HTTPHeaders;
> $HTTPHeaders = "Content-type: text/html; charset=iso-8859-13;";
> I then copied xlpage-iso-8859-13.php file to the .../scripts directory and the
> added a line in the .../local/config.php file as follows:
> This enables me to write with Lithuanian diacriticals - and read it with
> the correct glyphs.
> 3. Questions.
> 3.1 Considering that my knowledge of php is very close to zilch, is the above
> procedure "safe"?
There's nothing in PHP that makes this unsafe.
I can't say whether that's the One Right Way to do it in PmWiki though.
Maybe PmWiki needs another configuration variable to do that properly.
> 3.2 I notice that there are some pages waiting for translation into
> Lithuanian: PmWikiLt.PmWikiLt, PmWikiLt.XLPage. If no one else is doing it,
> I would like to start the translation. As the files seem to be one long
> line, it would be very awkward to handle. I would probably write a small
> script (in Python) that would split up the text into meaningful lines and
> probably write another script to merge it all back into one amorphous mass.
> However, that is probably reinvention of a wheel - is there some "standard"
> way of handling this task.
If I have understood things correctly, then yes there is: simply edit
them within PmWiki.
You can edit all files within wikilib.d - PmWikiLt.XLPage is page
"XLPage" in group "PmWikiLt", so you edit it by calling up this URL:
When you save the page, it will go do wiki.d, and be called from there
in the future.
If you want to redistribute PmWiki with your changes, move the
PmWikiLt.* files from wiki.d to wikilib.de and tar the thing up (with an
empty wiki.d directory, to avoid overwriting user files when they do an
upgrade to your version of PmWiki).
Warning: the above may be partly wrong. It's the way I'd try to do it,
based on half-remembered info that I read somewhere in the PmWiki docs.
Take a look at http://pmwiki.org/wiki/PmWiki/Internationalizations and
http://www.pmwiki.org/wiki/Localization/Localization for original
More information about the pmwiki-users