[pmwiki-users] Question on internationalization and farms

Petko Yotov 5ko at free.fr
Sun Apr 22 06:27:35 CDT 2007


On Sunday 22 April 2007 12:16, f.r.salomons wrote:
> Petko Yotov schreef:
> > On Sunday 22 April 2007 11:39, f.r.salomons wrote:
> >> In my farmconfig.php, I activated Dutch localizations by:
> >> XLPage('nl','PmWikiNl.XLPage');
> >> XLPage('nl','PmWikiNl.XLPageCookbook');
> >>
> >> Strange thing is, that the first XLPage is created by putting the files
> >> from i18n-nl.zip in the right location and works for the whole farm,
> >> while the second XLPage has to be created manually (on the basis of
> >> PmWiki/XLPageCookbookTemplate) and only works for the home wiki of my
> >> farm.
> >>
> >> Is there any way to make XLPageCookbook also active for the other wiki's
> >> in my farm or do I have to duplicate it for each of them?
> >
> > Yes, when you finish editing the page PmWikiNl.XLPageCookbook, move the
> > file PmWikiNl.XLPageCookbook:
> > * from the farm's "wiki.d" directory
> > * to the farm's "wikilib.d" directory
> >
> > or better, if you have shell access, link it there.
> >
> > In that case the page will become visible to the fields too.
> >
> > When/if you add or modify the page again, move it again into "wikilib.d".
> >
> > Petko
>
> Aha, I'm beginning to understand. Right now, there's a XLPage in my
> farm's "wiki.d" directory and in my farm's "wikilib.d" directory
> (different filesizes) and a XLPageCookbook only in my farm's "wiki.d"
> directory. Can it be that the latter is only a link to the first one?

In wikilib.d are files that generally come with PmWiki and inside the farm, 
are visible in all fields. If you modify one of the files there, it's content 
gets copied to wiki.d of the field (or the farm) and subsequently loaded from 
there. Files in wiki.d are not visible among fields, even the "farm" 's 
wiki.d, the only "shared" directory is the farm's wikilib.d.

So, when you edit a page through the wiki, it gets copied from wikilib.d to 
wiki.d and the subsequent changes are visible only to the same field.

That's why I suggested, when you finish editing, to copy or move the file back 
to the shared wikilib.d.

If you create a link, normally when you edit the file from the farm-wiki, the 
link in wikilib.d will always point to it and the changes will be visible in 
the fields.

>
> Am I right to understand that if I link from my farm's "wikilib.d"
> directory to XLPageCookbook in my farm's "wiki.d" directory, I don't
> have to move that page to the farm's "wikilib.d" directory every time I
> make some changes? If so, I prefer that solution. But I don't know how
> to make a link to it (I do have shell access). Any hints?

I only know for GNU/Linux-like systems, unix, *bsd.

1. remove the file in wikilib.d (if it exists, or else you cannot create a 
link with the same name)

2. the link command is like this (on one line):

  ln -s /path/to/real-file.ext /path/to/dir/ , example:
  ln -s /path/to/farm/wiki.d/PmWikiNl.XLPageCookbook /path/to/farm/wikilib.d/

and this creates a "link" 
named /path/to/farm/wikilib.d/PmWikiNl.XLPageCookbook

Petko




More information about the pmwiki-users mailing list