VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: KarlRanseier on September 04, 2012, 13:42:57 PM

Title: [SOLVED] payment plugin name is not translated from the language files
Post by: KarlRanseier on September 04, 2012, 13:42:57 PM
Hi, i just developed a payment plugin and i can't figure out how to display in the dropdown of the new payment method area the right translation.
in the xml i defined my plugin name like this:
<name>plg_vmpayment_name</name>

my language files
pluginfolder/language/en_GB/en-GB.plg_vmpayment_acceptance.sys.ini
Administrator/language/en_GB/en-GB.plg_vmpayment_acceptance.ini

in both i translated the name but nothing happens.
So the name will not be translated in the dropdown. does anyone know why or how to fix this?
Title: Re: payment plugin name is not translated from the language files
Post by: alatak on September 06, 2012, 11:32:10 AM
Hello

it is probably a type you made when copy /pasting, but the folder is called
en-GB and not en_GB

Both files must be in the administrator/language folder.

If your plugin is called "acceptance", then the language file will be loaded automatically.
If not, check your language file, that all lines are like that
KEY="my string"
Title: Re: payment plugin name is not translated from the language files
Post by: KarlRanseier on September 06, 2012, 18:57:40 PM
Hi thanks for the reply,
yes you are right, i wrote it the wrong way, the folder is en-GB and not en_GB

But now i have the languagefiles in the administrator/language folder and its still the same.

the language files are looking fine. KEY="value"


Quote from: acceptance.phpclass plgVmPaymentAcceptance extends vmPSPlugin {...


Quote from: acceptance.xml<name>PLG_VMPAYMENT_ACCEPTANCE</name>

administrator/language/en-GB/en-GB.plg_vmpayment_acceptance.ini
administrator/language/en-GB/en-GB.plg_vmpayment_acceptance.sys.ini
administrator/language/de-DE/de-DE.plg_vmpayment_acceptance.ini
administrator/language/de-DE/de-DE.plg_vmpayment_acceptance.sys.ini
QuotePLG_VMPAYMENT_ACCEPTANCE="VM - Payment, Acceptance"

So where exactly should this translation come from?
All other translations for the plugin are working just in the dropdown its not visible. see attachment.

[attachment cleanup by admin]
Title: Re: payment plugin name is not translated from the language files
Post by: alatak on September 06, 2012, 19:11:10 PM
Hello

Actually, for the plugins integrated in the AIO component, it is the installer that set the name in the extension table.

you should have <name>My payment name</name> in the XML file.
Title: Re: payment plugin name is not translated from the language files
Post by: KarlRanseier on September 06, 2012, 20:46:28 PM
ah ok, so its not possible to translate this.

thanks for the quick reply