This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 17 replies, has 2 voices.

Last updated by Yvette 2 months, 1 week ago.

Assigned support staff: Yvette.

Author Posts
July 15, 2019 at 7:07 am

kamilK-6

Hello,

I'm trying to translate Woof custom tax label and Woof filter button.

I used the following code from this post:
https://wpml.org/forums/topic/i-cant-locate-the-woof-products-filter-title-string-to-translate/

$string = apply_filters('wpml_translate_single_string', $WOOF->settings['custom_tax_label'][$taxonomy_info->name], 'admin_texts_woof_settings', '[woof_settings][custom_tax_label]'.$taxonomy_info->name ); 

If I use this code, I can translate the custom tax label but the filter button disappears.

Regards

July 15, 2019 at 1:58 pm #4211909

Yvette
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

Hello

Can you please send a screenshot/link/steps where I can see the Woof texts and also the filter you are referring to on your site?

Thanks for sending along the original link as well.

July 15, 2019 at 2:22 pm #4212183

kamilK-6

Hi,

Link:
hidden link

I have marked these elements in the attachment.

Now I commented this custom code.

Regards

July 16, 2019 at 11:22 am #4219605

Yvette
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

Where is the custom code that you "commented" out located? Could you please give directory and archive name?

And could you please re-instate the changes so I can see the fitler button disappearing?

Thank you.

July 16, 2019 at 11:27 am #4219615

kamilK-6

Hi,
*wp-content/plugins/woocommerce-products-filter/classes/helper.php
line 270

Regards

July 17, 2019 at 8:00 am #4226977

Yvette
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

Thanks for that help. Unfortunately, when I remove the comments, there is a syntax error somewhere in your functions.php (see image)

I am reticent to do any kind of further modifications, so could you please do the necessary so that the calls to the WPML API are enabled again?

Thanks for letting me know when this is done.

July 17, 2019 at 10:02 am #4228437

kamilK-6

Hi,

We did not make any changes to the wp-content/plugins/sitepress-multilingual-cms/inc/functions.php file.

I remove the comments, You know, the custom tax label is ok, but there is no button text (see image).
The button text has disappeared in all languages.

Look: hidden link

so could you please do the necessary so that the calls to the WPML API are enabled again?
Sorry but I don't understand. Where can I enable the WPML API?

Regards

July 17, 2019 at 1:27 pm #4230535

Yvette
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

Hello

OK - the modfication that you made according to the older ticket from 2018 is for a very old version of the plugin and most likely is not effective anymore.

If the labels are not translating, there may be a new compatibiity issue although I have confirmed that the plugin has been tested with the version you are currently using.

I have prepared a sandbox site here:
hidden link

This site has been prepared with our latest plugins , Woocommerce, some sample data and the WOOF - WooCommerce Products Filter plugin.

Please configure a sample case and confirm that the issue is happening on this sandbox site. If you cannot reproduce the error, then we can compare what might not be working on your own site.

There may be a problem with your theme or with another interfering plugin.
I wait for your news on this matter.

July 18, 2019 at 7:49 am #4235813

kamilK-6

Hi,

I can't configure a sample case on the sandbox site.

In 'WPML / String Translation / Translate texts in admin screens' I can't check the 'pa_color' option (see image).

I check the option, I click save, after refreshing the page the option is unchecked.

Regards

July 18, 2019 at 11:02 am #4237867

Yvette
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

Ok - I´ve done this for you manually by adding the following to the Custom XML Configuration:

<wpml-config>
  <admin-texts>
    <key name="woof_settings">
      <key name="custom_tax_label">
        <key name="pa_color"/>
      </key>
    </key>
  </admin-texts>
</wpml-config>

It´s now available for translation.

If this is the page you setup as an example:
hidden link

Then it seems to be working as expected! Do you agree?

In this case, the problem on your site might be due to another issue. Please try deactivating all of your non.WPML plugins except for Woof and also temporarily change yoru active theme to be Storefront.

This will be the same configuration as the sandbox site.

In this configuration, are you still not able to see the translated labels and the Filter button?

July 18, 2019 at 11:26 am #4238007

kamilK-6

Thanks.

I translated 'Color' in String Translation (see image).
But in the frontend it is untranslated. Look: hidden link

Text in the filter button is ok.

July 18, 2019 at 12:01 pm #4238439

Yvette
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

Ok - this is good. Thank you so much for your assistance.
I have escalated this to our compatibility team.

August 8, 2019 at 9:17 am #4361437

kamilK-6

Hi,
Is the problem resolved?
Regards

August 8, 2019 at 9:28 am #4361471

Yvette
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

Yes - I can see in the internal notes that last week the plugin author released a fix.:
hidden link

The details are described on their site.

August 12, 2019 at 1:14 pm #4381121

kamilK-6

Hi,
Thank you for your response.

I did these things but I don't understand how to translate the labels.

Regards