Several texts are in English, not multilangual. How do i change these texts

Scorpion Computers & Software
72 Posts
Scorpion Computers & Software posted this 30 June 2015

I manily use Virtuemart Templates, but i consider this to be a overal problem.
There are several texts that are hardcoded in English. Texts like 'added' and 'cart'
I understand that i can change them somewhere in the PHP-code, but every time we get and update this code is overwritten.
So is there no way i can change them? Can't we use language files or something?

I manily use Virtuemart Templates, but i consider this to be a overal problem. There are several texts that are hardcoded in English. Texts like 'added' and 'cart' I understand that i can change them somewhere in the PHP-code, but every time we get and update this code is overwritten. So is there no way i can change them? Can't we use language files or something?
Vote to pay developers attention to this features or issue.
15 Comments
Order By: Standard | Newest
Support Team
Support Team posted this 30 June 2015

Hello Edwin,
Looks like the translation file which you're using to translate VM components on the front end does not have some keys.

Themler uses regular joomla translatable string, e.g.:

$button = JText::_('COM_VIRTUEMART_ADDTOCART_CHOOSE_VARIANT');

So, this text should be translated if the translation file has an appropriate key.
Please check this. By default the translations files are located in the [joomla_root]\language\<lang>-<LANG>\ directory. If the keys do not exists please try adding to the .ini specific for your translation language or VM translation files (like ..\Joomla\components\com_virtuemart\language\en-GB\en-GB.com_virtuemart.ini ). E.g.

COM_VIRTUEMART_CART_DELETE="Delete Product From Cart"

Regards,
Aileen

Hello Edwin, Looks like the translation file which you're using to translate VM components on the front end does not have some keys. Themler uses regular joomla translatable string, e.g.: $button = JText::_('COM_VIRTUEMART_ADDTOCART_CHOOSE_VARIANT'); So, this text should be translated if the translation file has an appropriate key. Please check this. By default the translations files are located in the `[joomla_root]\language\<lang>-<LANG>\` directory. If the keys do not exists please try adding to the .ini specific for your translation language or VM translation files (like `..\Joomla\components\com_virtuemart\language\en-GB\en-GB.com_virtuemart.ini` ). E.g. COM_VIRTUEMART_CART_DELETE="Delete Product From Cart" Regards, Aileen
Scorpion Computers & Software
72 Posts
Scorpion Computers & Software posted this 30 June 2015

When i add a product to the cart, then the button text is changed to 'ADDED' (line 156: data-vmsuccessmsg in html/com_virtuemart/category/default.php). I do not understand why you choose not to use the default add2cart functionality from virtuemart.
Also the text for the mini-cart shows 'YOUR CART:'

These, and maybe some more' are texts that are hardcoded and not using any default Joomla translations, and these are the texts i'm talking about.

When i add a product to the cart, then the button text is changed to 'ADDED' (line 156: data-vmsuccessmsg in html/com_virtuemart/category/default.php). I do not understand why you choose not to use the default add2cart functionality from virtuemart. Also the text for the mini-cart shows 'YOUR CART:' These, and maybe some more' are texts that are hardcoded and not using any default Joomla translations, and these are the texts i'm talking about.
Support Team
Support Team posted this 30 June 2015

Hi Edwin,
thank you for pointing to that. We'll review the translations in VM templates.

regards,
Aileen

Hi Edwin, thank you for pointing to that. We'll review the translations in VM templates. regards, Aileen
Support Team
Support Team posted this 30 June 2015

Hi,
just a follow up: I'm not sure that I see what you mean by

mini-cart text

Do you mean the test in Cart Link control:

CartLink.png

regards,
Aileen

Hi, just a follow up: I'm not sure that I see what you mean by > mini-cart text Do you mean the test in Cart Link control: !CartLink.png! regards, Aileen
Scorpion Computers & Software
72 Posts
Scorpion Computers & Software posted this 30 June 2015

that is exactly what i mean

that is exactly what i mean
Support Team
Support Team posted this 30 June 2015

Hi Edwin,
just to let you know. The "Added" text is replaced with translation key in the code.
The "Cart" text in the current version also comes from translation key. You may check it in the file
theme_name\editor\includes\cartlink\default_cartlink_1.php , e.g.

<?php echo sprintf(jText::_('Cart (%s)'), $data->totalProduct) ?>

Regards,
Aileen

Hi Edwin, just to let you know. The "Added" text is replaced with translation key in the code. The "Cart" text in the current version also comes from translation key. You may check it in the file `theme_name\editor\includes\cartlink\default_cartlink_1.php` , e.g. <?php echo sprintf(jText::_('Cart (%s)'), $data->totalProduct) ?> Regards, Aileen
Scorpion Computers & Software
72 Posts
Scorpion Computers & Software posted this 01 July 2015

As i said before, the fact that you use jText is not indicating that you are using variables out of a language file.
I can not override 'Cart (%s)'. You could use something like:

JText::_('COM_VIRTUEMART_CART_TITLE');

As i said before, the fact that you use jText is not indicating that you are using variables out of a language file. I can not override 'Cart (%s)'. You could use something like: JText::_('COM_VIRTUEMART_CART_TITLE');
Support Team
Support Team posted this 01 July 2015

Hi,

The issue with Cart title will be fixed in the next major Themler update.

Thank you,
Olivia

Hi, The issue with Cart title will be fixed in the next major Themler update. Thank you, Olivia
evdokimov.55
4 Posts
evdokimov.55 posted this 15 June 2017

Good day! In what file can I change the button label "added"?

Good day! In what file can I change the button label "added"?
Support Team
Support Team posted this 16 June 2017

Hi,

You can localize this text by adding translation for the following key:
COM_VIRTUEMART_CART_ADDED
For example:
COM_VIRTUEMART_CART_ADDED="Добавлено"

The key with translation should be added to the translation file you're using for localization.

Thank you,
Olivia

Hi, You can localize this text by adding translation for the following key: `COM_VIRTUEMART_CART_ADDED` For example: `COM_VIRTUEMART_CART_ADDED="Добавлено"` The key with translation should be added to the translation file you're using for localization. Thank you, Olivia
Scorpion Computers & Software
72 Posts
Scorpion Computers & Software posted this 18 June 2017

or you can simple use the language override functionality that is build into the backend of Joomla! and add this override.

or you can simple use the language override functionality that is build into the backend of Joomla! and add this override.
evdokimov.55
4 Posts
evdokimov.55 posted this 21 June 2017

Your advice is not helping...! The value added to all localization files. Nothing izmenilos.
http://firma17.iforw.ru

Your advice is not helping...! The value added to all localization files. Nothing izmenilos. http://firma17.iforw.ru
evdokimov.55
4 Posts
evdokimov.55 posted this 21 June 2017

screenshot

screenshot
Support Team
Support Team posted this 21 June 2017

evdokimov.55,

Could you please create a new private topic with detailed description of the issue and access to the admin panel and FTP.

Thank you,
Olivia

evdokimov.55, Could you please create a new private topic with detailed description of the issue and access to the admin panel and FTP. Thank you, Olivia
Scorpion Computers & Software
72 Posts
Scorpion Computers & Software posted this 22 June 2017

For your help. I have added a language override in Joomla!
Extensions - Languages - Overrides
I have used the key: COM_VIRTUEMART_CART_ADDED
And have changed it toe something in my language (Dutch).
This was all that was necessary to make it work.
If you want to see an example, take a look ate https://texelvliegerhuis.nl/

For your help. I have added a language override in Joomla! Extensions - Languages - Overrides I have used the key: COM_VIRTUEMART_CART_ADDED And have changed it toe something in my language (Dutch). This was all that was necessary to make it work. If you want to see an example, take a look ate https://texelvliegerhuis.nl/
You must log in or register to leave comments