News:

Support the VirtueMart project and become a member

Main Menu

[SOLVED] Multilingual: Variants label are not translated

Started by m.davide82, January 13, 2020, 16:44:30 PM

Previous topic - Next topic

pinochico

Until today, I thought Virtuemart core should not translate customfiled values and I must always use the Customfield4All plugin from BreakDesign.

According to the discussion, it looks like it's a bug in Virtuemart?
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

jjk

Quote from: pinochico on January 18, 2020, 07:14:58 AM
According to the discussion, it looks like it's a bug in Virtuemart?
I don't think so. I've been using core VM custom fields in my shop since many years, including latest version.
See: http://forum.virtuemart.net/index.php?topic=96758.msg318220#msg318220
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

m.davide82

Hi to everybody,

just tested everything, debug included, but the overrides are working for everything, but not for the custom fields.

Any help please?


Thanks.
Davide

jflash

Try to put this strings into your languagefile xx-XX.com_virtuemart.ini and just in case do it in admin and site languagefiles. Is it working this way?

m.davide82

Hi,

just tested, but the answer is NO.
It's not working.

jjk

Can you post screenshots of a custom field settings and of the 'Product [Edit] custom fields tab of a product to which you have assigned the custom field?
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

m.davide82

Hi jjk,

sure, please see the attachments.

Thanks.
Davide

jjk

#22
I just tested the label translation with the settings from your screenshots in VM 3.6.11 build number 10238 (without finetuning the display for my template). It works in my case. See images attached. Note that the '0.00 €' is the translation of 'no additional charge' in my german language file. Also I didn't create a language key to translate the value (your 'Si')

When you enable 'Debug Language' in Joomla, does it really show now parsing errors in a language file?
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

m.davide82

Hi Jjk,

in debug language...

For that variables I see ?? instead off **.
Please see the attachment.

Any idea?


Thanks.
Davide

Studio 42

Quote from: m.davide82 on January 29, 2020, 09:04:34 AM
Hi Jjk,

in debug language...

For that variables I see ?? instead off **.

This mean that you have an error in the language file.
Try to remove or rename old override file and enter only 1 translation in the back-end and check if it work.

jjk

The question marks mean that the string is translatable but no match was found in the language definition file. In this case I suppose that Davide didn't enter a language key in the VM custom field value. In one of the examples above there should be something like:
In the VM custom field selected as the custom field type in the 'Custom Field' tab of the product: CAMPI_TEMPORIZZATORE
In the VM custom field value: CAMPI_TEMPORIZZATORE_VALUE_YES

Both language keys/strings have to be added to the site language override files (English/Italian).
So the override for the custom value field should be for example: CAMPI_TEMPORIZZATORE_VALUE_YES="Yes"
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

m.davide82

Hi,

I inserted just the:
CAMPI_TEMPORIZZATORE="Temporizzatore"

The dropdown results for the moment can be in english.


Thanks.
Davide

m.davide82


m.davide82

Hi,

I just did anothet test.

I created another language variable, I inserted it near the custom field title and it is translated.

<div class="product-fields-title-wrapper">
        <span <?php echo $titleClass $title ?>> <?php echo vmText::_($field->custom_title) . vmText::_('TEST'?> </span>
</div>


So, the problem is in the custom field title code.
Why I'm not able to translate this dynamic part?  $field->custom_title

Thanks.
Davide

Jörgen

THE problem lies in THE text string. Are you Syre that you have No hidden characters and correct syntax for the customs field data. Place THE key string immediately arter THE custom field language string and try again.
IF THE custom field string is outputted it Will get translated only IF THE syntax is correct. Check for extra characters.

Jörgen
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.