Please make sure to update to WPML 4.3.6 and check our list of Known Issues before reporting

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: New strings from PHP templates are not added in WPML String Translation

Solution: WPML is automatically scanning for strings whenever a new plugin or theme is installed, but when you add custom code inside an already enabled plugin, you might need to scan for the strings once again.

Please go to WPML > Theme and plugins localization and follow the method below: https://wpml.org/documentation/getting-started-guide/theme-localization/#scanning-plugins-for-texts

After that, please go to WPML > String Translation and search for the strings again.

This topic contains 12 replies, has 2 voices.

Last updated by brigitteK-2 7 months, 2 weeks ago.

Assigned support staff: Mihai Apetrei.

Author Posts
May 31, 2019 at 1:08 pm #3930759

brigitteK-2

I am trying to: add new strings <?php echo __( 'Hello, dear user!', 'woocommerce-pdf-invoices-packing-slips' ); ?> from the themes/woocommerce/CustomTemplate/pdf/

Link to a page where the issue can be seen: Newly added string not shown in the String Translation page

I expected to see: newly added string

Instead, I got: Nothing

May 31, 2019 at 2:52 pm #3931403

Mihai Apetrei
Supporter

Languages: English (English )

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

Hi and thank you for contacting WPML Support!

I will be happy to help you with this.

WPML is automatically scanning for strings whenever a new plugin or theme is installed, but when you add custom code inside an already enabled plugin, you might need to scan for the strings once again.

Please go to WPML > Theme and plugins localization and follow the method below:
https://wpml.org/documentation/getting-started-guide/theme-localization/#scanning-plugins-for-texts

After that, please go to WPML > String Translation and search for the strings again.

Please let me know if this solved your issue or if you still need help.

I will be waiting for your response.

Kind regards,
Mihai Apetrei

June 1, 2019 at 8:33 am #3934601

brigitteK-2

Hello Mihai, thanks a lot for your answer. I scanned the entire WooCommerce plugin and received the feedback that the scan was successful. While I now found and translated all strings for the e-mails defined in the following files:
customer-processing-order.php
customer-new-account.php
admin-cancelled-order.php

the strings of these two do still not appear
customer-reset-password.php
customer-refund-order.php

Please advise. Thank you very much.
Brigitte

June 3, 2019 at 1:10 pm #3942583

Mihai Apetrei
Supporter

Languages: English (English )

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

Hi.

1. Can you please let me know what are the strings that you still can't find in WPML > String Translation?

June 3, 2019 at 1:12 pm #3942657

Mihai Apetrei
Supporter

Languages: English (English )

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

2. I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Our Debugging Procedures

I will be checking various settings in the backend to see if the issue can be resolved. Although I won't be making changes that affect the live site, it is still good practice to backup the site before providing us access. In the event that we do need to debug the site further, I will duplicate the site and work in a separate, local development environment to avoid affecting the live site.

Privacy and Security Policy

We have strict policies regarding privacy and access to your information. Please see:
https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

**IMPORTANT**

- Please make a backup of the site files and database before providing us access.

- If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box.

The private box looks like this: hidden link

In order to be able to help you faster, can you also please paste your WPML Debug information in the Debug information field?
http://wpml.org/faq/provide-debug-information-faster-support/

I will be waiting for your response.

Kind regards,
Mihai Apetrei

June 4, 2019 at 1:44 pm #3952097

Mihai Apetrei
Supporter

Languages: English (English )

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

Hi and thank you for the info + the credentials.

I can confirm that they work.

I will spend more time on this and I will get back to you as soon as I have more feedback.

I will currently leave the ticket assigned to myself.

Kind regards,
Mihai

June 4, 2019 at 5:49 pm #3954223

brigitteK-2

Hi Mihai, what do you mean "they work"? Do you want me to do the translation?
Kind regards
Brigitte

June 5, 2019 at 2:54 pm #3961983

Mihai Apetrei
Supporter

Languages: English (English )

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

Hi Brigitte.

I was referring to the credentials that you shared with me - I confirmed that they worked for me and I was able to log in 🙂

I will get back to you as soon as I have more feedback on this.

Until then, I will leave this ticket assigned to myself.

Kind regards,
Mihai

June 7, 2019 at 6:52 am #3974271

brigitteK-2

Hi Mihai, of course they work as I tested them 🙂

Do you have more information yet? Kind regards, Brigitte

June 7, 2019 at 9:20 pm #3979121

Mihai Apetrei
Supporter

Languages: English (English )

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

Hi Brigitte.

Thank you for your patience.

There's quite a few strings there and I am not able to get them to work at the moment.

1. Can you please let me know if these templates were part of the theme or if they were custom added?

2. I created this clean sandbox setup on our servers here: hidden link (one-click login)

WPML + WPML add-ons are already installed, all I would need from you is set WPML up as you have it on your site, install the theme that you are using, set it up and please try to reproduce the issue on our servers, too.

If the issue is happening on our servers, too, then I would be able to forward this to your Compatibility department.

The main idea of a clean sandbox setup is to use just the WPML plugins and the theme/plugin that the client is experiencing issues with so please install only what's needed to reproduce the issues.

Please let me know what you will be able to find out.

I will be waiting for your response.

Just a note that I won't be working on the weekend so I will be able to get back to you at the beginning of next week.

Kind regards,
Mihai

June 8, 2019 at 6:28 pm #3981255

brigitteK-2

Hi Mihai,
thank you very much for all your effort.

Your first question brought me to the idea that solved the problem.
WooCommerce brings a whole bunch of e-mails into the system. If you want to change the text and prevent it from being destroyed with each of the many updates you can hit the button "copy to theme". In this moment the file is copied to a different repository under the theme and you can change the texts. The format is done with an integrated tool by the name of "Decorator".

When you told me to scan for the strings I did so and 3 out of 5 e-mails entered the system. But this morning it occurred to me that I could try to scan the theme, like I did with the plugin. That was the solution. I translated and tested everything and it works.

You can close the ticket. If I get a chance to feedback on you I of course will give you as many stars as there are.

Kind regards
Brigitte

June 10, 2019 at 7:18 am #3985497

Mihai Apetrei
Supporter

Languages: English (English )

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

Hi Brigitte.

I am very happy to hear that things work now 🙂

Please mark this ticket as resolved and after that, you will be able to also leave a review.

Thank you very much for your kind words and never hesitate to come back for more WPML help whenever you need it.

Kind regards,
Mihai

June 11, 2019 at 11:14 am #3994549

brigitteK-2

My issue is resolved now. Thank you!