csutton
Hello, does anyone know if it's possible to use $lang (to localize a string depending on UI language) within wiki markup?
I tried:
<php>php echo $lang['stringname']</php>
<html><php echo $lang['stringname']?></html>
To no avail.
Thanks!
chi
No this isn't possible. The there are no DokuWiki variables in the scope of the evaluated PHP code.
What exactly are you trying to do anyway? There's probably a better way to do it.
csutton
OK, that's good to know.
Well, I'm managing translations into 8 languages, and I have lots of standard terms/expressions, particularly in my sidebar. Concrete example: a subhead in the sidebar called "related resources".
ryan-chappelle
If your sidebar is managed using DokuWiki code / it is an actual DokuWiki page, you'll get the better and easier by implementing a (pseudo) plugin with the translated strings yourself. Just take a look at any of the plugins that already provide translated strings (specifically in their 'lang' folder) and create a syntax mode that will output the required strings.