[pmwiki-users] translation of substring in pagelist template

lists at basel-inside.ch lists at basel-inside.ch
Mon Mar 3 06:13:35 CST 2014


How can I archive to translate the result of a substr in translation table?
$[{(substr {*$Trail} 9 7)}] (in my pagelist template

Test in content:
$[{(substr Special 0)}] != $[Special]
Special                 != Spezielles

many thanks for your hints

kind regards
Patrick Ogay



Zitat von lists at basel-inside.ch:

> Hello
>
> I have a small issue with a pagelist macro:
>
> [[#prnxontrail]]
> (:if equal {*$FullName} {=$FullName}:)
> ||table border=0 align=left width=500
> ||[[{<$FullName}?Trail={*$Trail}|<]][[{<$FullName}?Trail={*$Trail}|$[back]]]  
> || Category: /$[{(substr {*$Trail} 9 7)}]/   || (:if2  !  
> equal "{*$Trail} "  "  
> ":)[[{>$FullName}?Trail={*$Trail}|$[next]]][[{>$FullName}?Trail={*$Trail}|>]](:if2end:)||
> [[<<]]
> (:ifend:)
> [[#prnxontrailend]]
>
> ----
> $[next} - translation works in pagelist
> $[{(substr {*$Trail} 9 7)}]  substr o.k. but not translated in this  
> context 1)
>
> many thanks for looking at it.
>
> regards
> Patrick Ogay
>
>
>
> Cases:
> http://orientalcarpetstudio.com.jovinus-meta.net/Carpet/10071?  
> Trail=Category.Small
> => schuld be "klein" in German.
> english (master langage):
> http://orientalcarpetstudio.com.jovinus-meta.net/Carpet/10071?Trail=Category.Small&setlang=en
> (also play with lang buttons.)
>
> 1)
> annotation:
> If I use (substr {*$Trail} 9)} there are side effects when using  
> other pagelists, with error php needs to parameters, probrobably  
> because $trail is blank.
> but the length of the return variable  seems to be o.k. for indexing.
>
>
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>






More information about the pmwiki-users mailing list