Author Topic: [SOLVED] Multilingual: Variants label are not translated  (Read 3929 times)

pinochico

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 155
    • MiniJoomla
  • VirtueMart Version: 3
Re: Multilingual: Variants label are not translated
« Reply #15 on: January 18, 2020, 07:14:58 am »
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 from products, orders and database table
Virtuemart Email Manager - customs email templates

jjk

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3633
  • using Matomo instead of Google Analytics
Re: Multilingual: Variants label are not translated
« Reply #16 on: January 18, 2020, 12:28:04 pm »
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

  • Jr. Member
  • **
  • Posts: 161
Re: Multilingual: Variants label are not translated
« Reply #17 on: January 21, 2020, 18:22:32 pm »
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

  • 3rd party VirtueMart Developer
  • Beginner
  • *
  • Posts: 40
Re: Multilingual: Variants label are not translated
« Reply #18 on: January 21, 2020, 21:04:34 pm »
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

  • Jr. Member
  • **
  • Posts: 161
Re: Multilingual: Variants label are not translated
« Reply #19 on: January 22, 2020, 15:30:04 pm »
Hi,

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

jjk

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3633
  • using Matomo instead of Google Analytics
Re: Multilingual: Variants label are not translated
« Reply #20 on: January 22, 2020, 23:14:58 pm »
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

  • Jr. Member
  • **
  • Posts: 161
Re: Multilingual: Variants label are not translated
« Reply #21 on: January 23, 2020, 11:28:47 am »
Hi jjk,

sure, please see the attachments.

Thanks.
Davide

jjk

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3633
  • using Matomo instead of Google Analytics
Re: Multilingual: Variants label are not translated
« Reply #22 on: January 23, 2020, 21:29:41 pm »
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

  • Jr. Member
  • **
  • Posts: 161
Re: Multilingual: Variants label are not translated
« Reply #23 on: January 29, 2020, 09:04:34 am »
Hi Jjk,

in debug language...

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

Any idea?


Thanks.
Davide

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4243
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Multilingual: Variants label are not translated
« Reply #24 on: January 29, 2020, 09:52:53 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

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3633
  • using Matomo instead of Google Analytics
Re: Multilingual: Variants label are not translated
« Reply #25 on: January 29, 2020, 11:27:51 am »
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

  • Jr. Member
  • **
  • Posts: 161
Re: Multilingual: Variants label are not translated
« Reply #26 on: January 29, 2020, 14:39:45 pm »
Hi,

I inserted just the:
CAMPI_TEMPORIZZATORE="Temporizzatore"

The dropdown results for the moment can be in english.


Thanks.
Davide

m.davide82

  • Jr. Member
  • **
  • Posts: 161
Re: Multilingual: Variants label are not translated
« Reply #27 on: February 05, 2020, 07:54:49 am »
Any idea on how can I solve it?


Thanks.
Davide

m.davide82

  • Jr. Member
  • **
  • Posts: 161
Re: Multilingual: Variants label are not translated
« Reply #28 on: February 05, 2020, 08:05:24 am »
Hi,

I just did anothet test.

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

Code: [Select]
<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

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2587
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: Multilingual: Variants label are not translated
« Reply #29 on: February 05, 2020, 10:56:05 am »
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.8
Virtuemart 3.4.x
Olympiantheme Hera (customized)