[LON-CAPA-users] Access to effective language in scriptblock?
Stefan Bisitz
lon-capa-users@mail.lon-capa.org
Wed, 20 Jun 2007 13:42:28 +0200
Hi Guy,
> > But what to do if the text elements must be "calculated" in the
> script> block? Is there any possibility to access the effective
> language within
> > the script block?
>
> looks one can do this right now:
>
> &xmlparse("
> <languageblock include=\"de\">$german_text</languageblock>
> <languageblock exclude=\"de\">$english_text</languageblock>
> ");
Yes, this works, thank you. However, it is a bit long and complicated.
> Wouldn't be difficult to add a &get_preferred_languages() routine to
> return the list of desired languages.
This would be helpful and is what we prefer.
-> Bugzilla -> Enhancement?
Stefan Bisitz