Hi,
Is it possible to add localization files (i.e., files like en_US.inc etc.) to a skin? I know how to add these language files to a plugin but I was wondering whether this is supported by a skin as well?
Kind regards,
Martijn
On Tue, Jun 16, 2015 at 10:38 PM, martijn.list martijn.list@gmail.com wrote:
Hi,
Hello Martijn
Is it possible to add localization files (i.e., files like en_US.inc etc.) to a skin? I know how to add these language files to a plugin but I was wondering whether this is supported by a skin as well?
Localization files are directly supported in skins but there's a hidden and undocumented features that lets you defined multi-lingual labels inside skin templates. Use the <roundcube:label ... /> tag [1] for this and add translations by settings attributes with language codes like this:
<roundcube:label name="my.custom.label" en_US="My Label" de_DE="Mein Text" nl_NL="..." />
Together with the (also undocumented) attribute noshow="true", you can even load your custom texts from an include file in your skin folder (e.g. texts.html):
<roundcube:label name="my.custom.label" en_US="My Label" ... nowhow="true" />
and later use them with their name and in the actual template:
<roundcube:include file="texts.html" /> <roundcube:label name="my.custom.label" />
Note to myself: add this to the skin markup documentation.
Best, Thomas
[1] http://trac.roundcube.net/wiki/Doc_SkinML#roundcube:label