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 thread is resolved. Here is a description of the problem and solution.

Problem: I installed the Woocommerce Returns and Warranty Requests plugin and I would like to translate into my second language some fields that are managed directly in the settings of this plugin. For example,
- warranty_button_text ("Retour") -> I want "Return" for EN
- view_warranty_button_text ("Retour") -> I want "Return" for EN
- warranty_default_label ("Délai de retour") -> I want "Return delay" for EN

Solution: I followed this steps and the issue seems to be solved:
- Added the following code to WPML -> Paramètres -> Configuration XML personnalisée:

<wpml-config>
    <admin-texts>
        <key name="warranty_form">
            <key name="*"/></key>
    </admin-texts>
</wpml-config>

- WPML -> Langues -> Format d'URL de langue -> Selected the 'Langues différentes dans les répertoires' option -> Saved the changes -> Re-saved the permalink structre.
- WPML -> Langues -> Activated the 'Filtrage de langues pour les opérations AJAX' option -> Saved the changes.

Relevant Documentation:

This topic contains 12 replies, has 2 voices.

Last updated by Carlos Rojas 1 year ago.

Assigned support staff: Carlos Rojas.

Author Posts
October 9, 2018 at 8:47 am #2798968

eleonoreL

Hello,

I installed the Woocommerce Returns and Warranty Requests plugin and I would like to translate into my second language some fields that are managed directly in the settings of this plugin. For example,
- warranty_button_text ("Retour") -> I want "Return" for EN
- view_warranty_button_text ("Retour") -> I want "Return" for EN
- warranty_default_label ("Délai de retour") -> I want "Return delay" for EN
- And all the fields of "Waranty Form builder".

Could you tell me what to do?

Thank you,

Dona.

October 10, 2018 at 2:33 am #2802698

Carlos Rojas
Supporter

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

Timezone: America/Montevideo (GMT-03:00)

Hello Dona,
Thank you for contacting WPML support.
I'll do my best to help you solve this issue.

This strings are usually in the 'admin texts' section of String Translations. In this link you will find the steps to follow in order to translate this strings: https://wpml.org/documentation/getting-started-guide/string-translation/#admin_texts

Please let me know if you need furhter assistance and I will be more than happy to help.
Kind regards,
Carlos

October 10, 2018 at 8:22 am #2803354

eleonoreL

Thanks a lot.

It works very well for some labels but not for others (in the warranty form only). However, I followed the indications. See attachments.

Logs :
Elagency
PJlA(Zjb3A#btM0MYK

Best regards,

October 10, 2018 at 8:38 am #2803442

eleonoreL

I have another request. I had this code "<label>Quantité</label>" in "variation-add-to-cart-button.php" file. Is there a way to translate it?

Thanks,

October 10, 2018 at 7:03 pm #2805509

Carlos Rojas
Supporter

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

Timezone: America/Montevideo (GMT-03:00)

Hi Dona,

1.- Could you provide an URL where I can see the form of the screenshot?

2.- To make this string available for translation you need to wrap it in a gettext function (https://codex.wordpress.org/I18n_for_WordPress_Developers#Introduction_to_Gettext) the result should look like this:

<label><strong><?php _e('Quantité', 'domain'); ?></strong></label>

Looking forward to your message.
Best regards,
Carlos

October 10, 2018 at 9:05 pm #2805851

eleonoreL

1- hidden link

2- Perfect, thanks a lot !

October 10, 2018 at 9:21 pm #2805881

Carlos Rojas
Supporter

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

Timezone: America/Montevideo (GMT-03:00)

Hi,

Could you share an URL with the form in English?

The URL you share is in French, so I can't see the issue happening 🙂

Regards,
Carlos

October 10, 2018 at 9:23 pm #2805882

eleonoreL

Oops, sorry...

hidden link

October 11, 2018 at 1:04 am #2806077

Carlos Rojas
Supporter

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

Timezone: America/Montevideo (GMT-03:00)

Hi Dona,
Thank you very much for your message.

I noticed that there is a new version of the Returns and Warranty plugin. I kindly ask you to update the plugin and check if the issue persists.

If the issue persists then I have set a test site with a fresh new installation of WordPress + WPML + Woocommerce that you can access using this link: hidden link
Could you install the Returns and Warranty plugin in this test site and check if the issue persists?

Looking forward to your answer.
Best regards,
Carlos

October 16, 2018 at 7:13 am #2819876

eleonoreL

Hello,

I updated the plugin version but it did not solve the problem.

I also installed the plugin on your demo and configure the different elements, and it does not work either. The warranty form is not translated:

hidden link

Best regards,

October 16, 2018 at 6:36 pm #2822163

Carlos Rojas
Supporter

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

Timezone: America/Montevideo (GMT-03:00)

Hi Dona,

I followed this steps and the issue seems to be solved:
- Added the following code to WPML -> Paramètres -> Configuration XML personnalisée:

<wpml-config>
    <admin-texts>
        <key name="warranty_form">
            <key name="*"/></key>
    </admin-texts>
</wpml-config>

- WPML -> Langues -> Format d'URL de langue -> Selected the 'Langues différentes dans les répertoires' option -> Saved the changes -> Re-saved the permalink structre.
- WPML -> Langues -> Activated the 'Filtrage de langues pour les opérations AJAX' option -> Saved the changes.

Now the issue seems to be solved. You can check it by visiting this links:
- hidden link
- hidden link

Could you confirm that the issue is solved?

Best regards,
Carlos

October 16, 2018 at 6:49 pm #2822188

eleonoreL

My issue is resolved now. Thank you!

October 16, 2018 at 6:51 pm #2822191

Carlos Rojas
Supporter

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

Timezone: America/Montevideo (GMT-03:00)

Hi Dona,

I'm glad to hear that the issue is solved 🙂

Please don't hesitate to contact us if you need our help in the future with WPML. We will be more than happy to help.
Best regards,
Carlos