diff options
author | pmichaud <pmichaud@524c5546-5005-0410-9a3e-e25e191bd360> | 2005-01-30 17:48:51 +0000 |
---|---|---|
committer | pmichaud <pmichaud@524c5546-5005-0410-9a3e-e25e191bd360> | 2005-01-30 17:48:51 +0000 |
commit | 794f9d154bb5877f268842345bb32889f758d65d (patch) | |
tree | 497e798099bad4a0ad227afdc117bd776257bdae /wikilib.d/PmWiki.Internationalizations | |
parent | 61e29336620adc4499d6dc0ea17d0d0e4a4dcbbb (diff) | |
download | pmwiki.svn-794f9d154bb5877f268842345bb32889f758d65d.tar.bz2 |
*** empty log message ***
git-svn-id: svn://pmwiki.org/trunk/pmwiki@544 524c5546-5005-0410-9a3e-e25e191bd360
Diffstat (limited to 'wikilib.d/PmWiki.Internationalizations')
-rw-r--r-- | wikilib.d/PmWiki.Internationalizations | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/wikilib.d/PmWiki.Internationalizations b/wikilib.d/PmWiki.Internationalizations index 5a47788d..eb11b9a4 100644 --- a/wikilib.d/PmWiki.Internationalizations +++ b/wikilib.d/PmWiki.Internationalizations @@ -1,10 +1,10 @@ -version=pmwiki-2.0.beta12 +version=pmwiki-2.0.beta19 newline=² -time=1103719954 -text=PmWiki supports internationalization 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:² [=² XLPage('fr','PmWikiFr.XLPage'); # from i18n.tgz² XLPage('fr','PmWikiFr.XLPageLocal'); # my local translations² =]²²²!!!Creating new translations²²If language pages don't exist for your desired language, it's easy to create one! An [=XLPage=] translation file simply contains lines of the form²² 'phrase' => 'translated phrase',²²where "phrase" is an internationalized phrase (denoted by @@$[...]@@) in PmWiki's $...Fmt variables, and "translated phrase" is what should be printed in your particular language. For example, the line (in PmWikiFr.XLPage)²² [='SearchWiki' => 'Rechercher',=]²²converts "`SearchWiki" to "Rechercher" on output. The file PmWiki:XLPageTemplate is a good starting point for creating a new `XLPage and has most of PmWiki's key phrases already listed in it. Note that the translation mechanism only converts phrases that have been listed as translatable in $...Fmt strings--it won't translate things that appear in wiki markup.²²If you create new versions of PmWiki pages in other languages, please consider adding them to the [[PmWiki:PmWiki | main PmWiki site]] so that they can be made available to others in the ''i18n.tgz'' archive!²²->%note% The term "i18n" is commonly used as an abbreviation for the English word "internationalization". The abbreviation is derived from the fact that there are 18 letters between the "i" and the final "n" and few people want to type them all out. ²²²!!!Tools for PmWiki localization²²You can help to localize PmWiki in your language in the original site :²²* PmWiki:Localization/Localization²²²%trail% <<|PmWiki.DocumentationIndex|>> -targets=PmWiki.PmWiki,PmWikiFr.XLPage,PmWiki.UploadsAdmin,PmWiki.MailPosts,PmWiki.DocumentationIndex -author=Klonk +time=1106933488 +text=PmWiki supports internationalization 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:² [=² XLPage('fr','PmWikiFr.XLPage'); # from i18n.tgz² XLPage('fr','PmWikiFr.XLPageLocal'); # my local translations² =]²If your intention is to offer multiple languages on your site, and use WikiGroups as language selectors, you may want to place this code in local customizations files (see PerGroupCustomizations). For example, if your site is published in French and English, and the French pages are in a group called Fr, you could create a file named Fr.php in the local/ directory which contains:² [=² <?php if (!defined('PmWiki')) exit();² ##change to French language² XLPage('fr','PmWikiFr.XLPage');² ?>² =]²You may wish to create a page called `PmwikiFr.php with the same content to access the French documentation in the `PmwikiFr group.²En.php is not necessary in this case since English is the default language.²²An alternative to the above would be to add to config.php the following, which tests if there is an `XLPage in a group, and if it finds one it gets loaded:² [= ² $xlpage = FmtPageName('$Group.XLPage', $pagename);² if (PageExists($xlpage)) XLPage($xlpage, $xlpage);² =]²With this method you would need to copy any relevant `XLPage into any group which needs the different language support.²²!!!Creating new translations²²If language pages don't exist for your desired language, it's easy to create one! An [=XLPage=] translation file simply contains lines of the form²² 'phrase' => 'translated phrase',²²where "phrase" is an internationalized phrase (denoted by @@$[...]@@) in PmWiki's $...Fmt variables, and "translated phrase" is what should be printed in your particular language. For example, the line (in PmWikiFr.XLPage)²² [='SearchWiki' => 'Rechercher',=]²²converts "`SearchWiki" to "Rechercher" on output. The file PmWiki:XLPageTemplate is a good starting point for creating a new `XLPage and has most of PmWiki's key phrases already listed in it. Note that the translation mechanism only converts phrases that have been listed as translatable in $...Fmt strings--it won't translate things that appear in wiki markup.²²If you create new versions of PmWiki pages in other languages, please consider adding them to the [[PmWiki:PmWiki | main PmWiki site]] so that they can be made available to others in the ''i18n.tgz'' archive!²²->%note% The term "i18n" is commonly used as an abbreviation for the English word "internationalization". The abbreviation is derived from the fact that there are 18 letters between the "i" and the final "n" and few people want to type them all out. ²²²!!!Tools for PmWiki localization²²You can help to localize PmWiki in your language in the original site :²²* PmWiki:Localization/Localization²²²%trail% <<|PmWiki.DocumentationIndex|>> +targets=PmWiki.PmWiki,PmWikiFr.XLPage,PmWiki.WikiGroups,PmWiki.PerGroupCustomizations,PmWiki.UploadsAdmin,PmWiki.MailPosts,PmWiki.DocumentationIndex +author=HansB name=PmWiki.Internationalizations -host=62.245.250.121 -agent=Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 -rev=15 +host=84.66.94.10 +agent=Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; NetCaptor 7.5.2; .NET CLR 1.0.3705) +rev=19 |