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

jjk

Just wondering - does VP Framework have it's own override file?
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

m.davide82

Hi Jorgen,

as I thought, the problem is in the custom field title.

If I insert the variable after the code, it is translated.


<span <?php echo $titleClass $title ?>>
          <?php echo vmText::_($field->custom_title) . vmText::_('TEST') .' ' vmText::_('CAMPI_MOBILE'); ?>
</span>


Any idea?


Thank. Davide

Studio 42

Try to use trim to be sure you have no special char
vmText::_(trim($field->custom_title));

pinochico

If you constantly insist on this version and want to use this functionality that I only used in conjunction with CustomField4All -

there is no problem in the order of triggering individual triggers:
- rendering value customfiled_title
- call translation function (vmtext,  JTEXT)
???

For me, I would be the first (before writing on the forum) to test using the right Joomla function JTEXT.

Replacing all internal Joomla functions with their own "hooray now all VM instead of Joomla" may not always be required and useful (maybe for a standalone application installed subsequently on WordPress - once Virtuemart was already a standalone application - PS_SHOP).

Only then would I wonder how to render the content of customfield_title before calling the vmTEXT function respectively. JTEXT.

If I still fail here, I would ask here or return to the proven and functional method of using the CustomField4All plugin.
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

m.davide82

Quote from: Studio 42 on February 05, 2020, 18:41:03 PM
Try to use trim to be sure you have no special char
vmText::_(trim($field->custom_title));

Hi,

thank you very much, finally it works!!!

Probably the best will be to resolve this in VM core.


Thanks a lot,
Davide


m.davide82

Quote from: pinochico on February 05, 2020, 19:10:16 PM
If you constantly insist on this version and want to use this functionality that I only used in conjunction with CustomField4All -

there is no problem in the order of triggering individual triggers:
- rendering value customfiled_title
- call translation function (vmtext,  JTEXT)
???

For me, I would be the first (before writing on the forum) to test using the right Joomla function JTEXT.

Replacing all internal Joomla functions with their own "hooray now all VM instead of Joomla" may not always be required and useful (maybe for a standalone application installed subsequently on WordPress - once Virtuemart was already a standalone application - PS_SHOP).

Only then would I wonder how to render the content of customfield_title before calling the vmTEXT function respectively. JTEXT.

If I still fail here, I would ask here or return to the proven and functional method of using the CustomField4All plugin.

Before to write I tested JText, but the result was the same.
If you have a website with more than 10.000 products, you can't change all the custom fields, trust me.

Studio 42

if it work with trim, then you have hidden special char in your custom_title

m.davide82

Hi,

it's very strange, I checked everything...
I deleted all the strings from override, I inserted just one string and it wasn't working...

Have a nice day,
Davide

Jörgen

There are a a lot of installs that do not need trim. If You don´t insert space characters in Your language keys, You simply do not need the extra trim call. Checking the strings for strange characters, spaces and syntax errors would probably do the trick.

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

pinochico

QuoteIf you have a website with more than 10.000 products, you can't change all the custom fields, trust me.

I trust You, we have eshops with 220 000 products :)
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