Development (plugin user)

11 years 5 months ago - 11 years 5 months ago #215230 by felichon
Development (plugin user) was created by felichon
[img size=100x100]eliopro.fr/images/stories/virtuemart/product/phoca_cb_produit1.png[/img][img size=100x100]eliopro.fr/images/photos/fronted.jpg[/img]

Hello, :cheer:

For my plugin for Community Builder Phoca Gallery , (Version : 1.5) I'd make it available internationnal language, today it is the default in French... :whistle:

How to add key language in the *.xml file ? (Plugin user)

I got no problem to translate all that is in the *.php file, but how to translate the *.xml file ? How syntax use it ? :woohoo:

I did not find any example to automatically translate the *.xml

I would like a plugin "multilingual", it is much more convenient than a plugin only in French.

Note : I added my user plugin folder named "language" with language files to *.php
In the code. * Php my main plugin, everything works fine with the keys of the language file, however the file *.xml does not want, it does not reflect my key, regardless of the manner in which I write.


I'm use this syntax :

In the language file. * php my keys are written like this:
$CB_PHOCA_PLUGIN_LANG['_TEST']='Word to translate here';

To see my key in the main plugin file, I called like this:
$return .=$CB_PHOCA_PLUGIN_LANG['_TEST'];

It works very well, but I do not know how to do the same in the file *.xml

For example, if I want a parameter "@spacer" to add a key result of this type, it does not work. I do not know what to try, if you have an idea, I'll try.
<param name="@spacer" type="spacer" label="_TEST" default="" description="" />

Thank you. ;)

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.317 seconds

Facebook Twitter LinkedIn