[Pmwiki-users] More translation-issues.

Patrick R. Michaud pmichaud
Mon Oct 25 11:54:09 CDT 2004


On Sun, Oct 24, 2004 at 07:14:31PM +0200, Philip J?genstedt wrote:
> I've found two more issued with translation:
> 
> 1. The RecentChanges-pages. It would be nice to be able to translate the 
> name of the page to something more appropriate in a non-english 
> language. 

This can be done.  Add the following to config.php:

   $RecentChangesFmt['$Group.$[RecentChanges]'] =
     '* [[$Group.$Name]]  . . . $CurrentTime $[by] $AuthorLink';

Whatever the phrase "RecentChanges" translates to will be the name
of the page receiving the recent changes updates.

> Also, 
> the date and "by" are not translated in the list of recent changes. I 
> fixed this by putting
> $CurrentTime = strftime(FmtPageName('$TimeFmt',$pagename),$Now);

Hmm, times should already be locale-specific, I need to check this.  Thanks.

> 2. I haven't found a clean way to translate the string 'Describe 
> [[$Group/$Name]] here.' since it contains variables to be substituted. 
> The only thing I can think of is putting the translations in config.php 
> and setting $DefaultPageTextFmt depending on the language, but that is 
> not so pretty.

$DefaultPageTextFmt is likely to get some changes anyway before 2.0
releases, but there should be nothing wrong with 

   '$[Describe [[$Group/$Name]] here.]'

and then having an entry for "Describe [[$Group/$Name]] here." in the
XLPage.  I'll even make this the default entry if it works.

Pm



More information about the pmwiki-users mailing list