mirror of
https://github.com/UnickSoft/graphonline.git
synced 2026-10-27 22:40:08 +00:00
first commit
This commit is contained in:
commit
c715e2a604
5325 files changed
+329700
No files matched your search
@@ -0,0 +1,9 @@
|
||||
version=pmwiki-2.2.42 ordered=1 urlencoded=1
|
||||
author=Petko
|
||||
charset=UTF-8
|
||||
csum=but after any $WikiDir and $WikiLibDirs setting
|
||||
name=PmWiki.Internationalizations
|
||||
rev=110
|
||||
targets=Group.Group,Group.XLPage,Group.XLPageLocal,PmWiki.OtherLanguages,PmWiki.UTF-8,PmWikiFr.XLPage,PmWiki.WikiGroup,PmWiki.GroupCustomizations,Cookbook.MultiLanguage,PmWiki.PmWiki,Localization.Localization
|
||||
text=(:Summary: Language internationalisation of web pages:)%0a[[#include]]%0aPmWiki supports internationalization (internationalisation) of web pages, allowing accented characters to appear in page names and almost complete customization of PmWiki's prompts. %0a[[#includeend]]%0aMost 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).%0a%0aThe rest of this page is devoted to the installation, configuration and usage of other language(s) support. If you are looking for tools and help to ''localize'' PmWiki in your language, or how you can improve the existing translations, start on pmwiki.org with the page [[(http://www.pmwiki.org/wiki/Localization/)Localization]] - The Translation Portal.%0a%0a>>rframe font-size:smaller clear:right%3c%3c%0a(:pagelist fmt=#languagelist2 trail=PmWiki.OtherLanguages order=name:)%0a(:if4 false:)%0a[[#languagelist2]]%0a(:template each:)%0a-%3c [[{=$Group}/]] {{=$Group}.{=$Group}$:Language} ~ [-[[{=$Group}/XLPage]]-] (:if exists {=$Group}.XLPageLocal:) [-[[{=$Group}/XLPageLocal]]-] (:ifend:)%0a[[#languagelistend]]%0a(:if4end:)%0a>>%3c%3c%0a!! [[#LoadingTranslationPages]] Loading Translation Pages%0a%0aPages for many [[(PmWiki:)other languages]] have already been created and maintained at the pmichaud.com site. You can download an archive of these translations from http://www.pmwiki.org/pub/pmwiki/i18n/ . Simply download the appropriate language archive(s), and unpack the archive(s) into the directory containing your ''pmwiki.php'' installation. Each 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). You can also use [[UTF-8]] charset.%0a%0aOnce 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%0a%0a->[@%0ainclude_once("scripts/xlpage-utf-8.php"); # optional%0aXLPage('fr','PmWikiFr.XLPage');@]%0a%0awhich says to load the translations for French ('fr') from the page [[PmWikiFr.XLPage]]. The include_once line is recommended if you start a new wiki, and it should be placed ''before'' the XLPage line (for languages with alphabets other than the Latin, the include_once line is required). These lines should be placed near the beginning of config.php, ''but after any $WikiDir and $WikiLibDirs setting (if you have such setting)''.%0a%0aIt's possible to load multiple pages; so if you want to create your own local translations without changing the ones you got from an i18n archive, just create another page (see below) and load it first. Be sure that you load first the page with your local changes:%0a%0a-> [@%0aXLPage('fr','PmWikiFr.XLPageLocal'); # my local translations%0aXLPage('fr','PmWikiFr.XLPage'); # from i18n.tgz%0a@]%0a%0aIf your intention is to offer multiple languages on your site, and use [[Wiki Group]]s as language selectors, you may want to place this code in local customizations files (see [[Group Customizations]]). 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:%0a%0a-> [@%0a%3c?php if (!defined('PmWiki')) exit();%0a##change to French language%0aXLPage('fr','PmWikiFr.XLPage');%0a@]%0a%0aYou 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.%0a%0aAn 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:%0a%0a-> [@ %0a$xlpage = FmtPageName('$Group.XLPage', $pagename);%0aif (PageExists($xlpage)) XLPage($xlpage, $xlpage);%0a@]%0a%0aWith this method you would need to copy any relevant XLPage into any group which needs the different language support.%0a%0aSee also [[Cookbook:MultiLanguage]] {Cookbook/MultiLanguage$:Summary}%0a%0a!![[#CreatingNewTranslations]]Creating New Translations%0a%0aIf 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%0a%0a->[@'phrase' => 'translated phrase',@]%0a%0awhere "phrase" is an internationalized phrase (denoted by [@$[phrase]@]) in PmWiki's $...Fmt variables, and "translated phrase" is what should be printed in your particular language. For example, the line (in [@PmWikiFr.XLPage@])%0a%0a->[@'Search' => 'Rechercher',@]%0a%0aconverts "[@$[Search]@]" to "Rechercher" on output. The file [[http://www.pmwiki.org/wiki/Localization/XLPageTemplate|Localization:XLPageTemplate]] is a good starting point for creating a new XLPage and has most of PmWLine truncated
|
||||
time=1345914537
|
||||
Reference in new issue
Block a user