1. atrus
  2. RO CSVI
  3. Tuesday, 09 July 2019
  4.  Subscribe via email
Hi all,

Trying to use the multireplace plugin on some JTEXT language overrides but it is not possible because CSVI first translates the language override (which btw is done wrongly, it doesn't respect the language you have chosen), and then does the overrides.

Is there any way to tell csvi to do the replacement before the translation?

see attached img

thank you in advance!
Accepted Answer Pending Moderation
Hello,
CSVI first translates the language override (which btw is done wrongly, it doesn't respect the language you have chosen),

This statement is wrong. CSVI does not do any language translations.

Is there any way to tell csvi to do the replacement before the translation?

Language override texts are stored in the language file in Joomla and not in database. CSVI does not work on values stored in files but only on values from database.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 1
Accepted Answer Pending Moderation
Thanks for the reply Tharuna,

Let me clarify:

JTEXTS (e.g. COM_VIRTUEMART_CFVALUE_AIRFILTERS) are saved in the database; we need to work with these JTEXTS (and not with their translated overrides in the files).

The problem is that CSVI translates these JTEXTS but it should not as you mentioned, so something wrong is happening there and CSVI checks the overrides?

In my case, I am exporting the custom fields values for a VM3 string type custom field (see attached image). All the CF values are saved as JTEXTS in the database (see my previous post's image in the multireplace plugin settings), but in the export file i see the translated override values (which are also not in the language set in the template settings, i guess it uses the default language override).

Hope it is becoming more clear now.

Thanks,
Chris
Attachments (1)
  1. more than a month ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation
Hello Chris,
Can you post your template XML file to check? To get the template XML go to CSVI Maintenance page, select CSVI Pro in first drop down, Backup templates in second dropdown. Select your export template. Click continue. Post the downloaded XML file.

Also post screenshots on how you have these custom fields saved in VirtueMart custom fields page and how the values are stored for these custom fields for products. That will help me analyse why you are seeing translated language string.

Do also post your export debug log.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 3
Accepted Answer Pending Moderation
Hello Tharuna,

Please see attached. I am attaching also an export log.
Attachments (4)
  1. more than a month ago
  2. RO CSVI
  3. # 4
Accepted Answer Pending Moderation
Hello Chris,
I don't see a reason why the language string don't work. I tried the same setup with one String custom field in my local site and export works. Can you send me a PM of your site administrator details? I will take a look in your site.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 5
Accepted Answer Pending Moderation
Ok thanks Tharuna, PM'd u the details
  1. more than a month ago
  2. RO CSVI
  3. # 6
Accepted Answer Pending Moderation
Hello Chris,
Thank you for sending the requested details. I had a look at your export and can see that language override has been exported instead of value from the rule. The reason is that with CSVI Google export, we are first replacing the language text using JText and then the rule is applied. Since the text has been already changed, rule does not find the language text and so no value applied. What you can do is create a override file for export and in the override file look for code at line 1763

default:
// See if we need to retrieve a custom field
if (in_array($fieldname, $this->customfieldsExport))

This is the code which checks if the field is a custom field. If you look little bit down at line 1784, you will see line
 $fieldvalue = \JText::_($fieldvalue);
remove that line. Save the file. Set the override file in your template. Run the export. Your rule value should be applied then.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 7
Accepted Answer Pending Moderation
Thanks Tharuna,

That's what i thought initially, that CSVI actually translates the JTEXT first thing. Please note that, as stated in my first post, the translated language is wrong. I.e. i have set my template settings to Greek and the strings get translated to English. So maybe you would like to check this at some point.

I will check your solution thanks again!

As a suggestion for a next version you could include a relevant config option in the edit field screen, so that it can be adjusted as needed very easily, see attached.
Attachments (1)
  1. more than a month ago
  2. RO CSVI
  3. # 8
Accepted Answer Pending Moderation
Hello Chris,
That's what i thought initially, that CSVI actually translates the JTEXT first thing. Please note that, as stated in my first post, the translated language is wrong. I.e. i have set my template settings to Greek and the strings get translated to English. So maybe you would like to check this at some point.

Yes, this is a good point. As of now the JTexts are translated to the language set in Joomla and not to the language set in CSVI template.

As a suggestion for a next version you could include a relevant config option in the edit field screen, so that it can be adjusted as needed very easily, see attached.

This is also a good feature.

We are adding both of your ideas to our todo list and will include it in our future release.

Thank you for your suggestions.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 9
Accepted Answer Pending Moderation
Thanks Tharuna!

Checked also your override solution and it works nicely :)
  1. more than a month ago
  2. RO CSVI
  3. # 10
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!