Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is unable to export the English .po file for "String Translation" as the dropdown list does not show English as an option, despite the website's origin language being Japanese with sub-languages including English, two Chinese, and Korean.
Solution:
We recommend the following steps after ensuring a full site backup. It will be fixed in WPML 4.6.
1) Modify the following line of code:

<?php foreach($active_languages as $al): if($al['code']==$string_settings['strings_language']) continue; ?>

in the files at:
- wp-content/plugins/wpml-string-translation/menu/string-translation.php, Line 645
- wp-content/plugins/wpml-string-translation/menu/string-translation.php, Line 723
Replace it with:

<?php foreach($active_languages as $al): ?>

2) Save the changes.
3) Navigate to WPML > String Translation. Select 'Also create translations according to the .po file' and choose English from the dropdown (which should now appear), then import them.

Please note that this solution might be outdated or not applicable to your specific case. We highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the issue persists, please open a new support ticket.

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.

Tagged: 

This topic contains 13 replies, has 2 voices.

Last updated by 柳橋 昌行 2 years, 11 months ago.

Assisted by: Bigul.

Author Posts
June 22, 2022 at 2:45 am #11515009

柳橋 昌行

I am trying to export English .po file for "String Translation" but DropDown list does not show English choice.
My website origin lang is Japanese, and sub-langs are English, 2 Chinese and Korean.

hidden link

I expect to see the DropDown list as English, 2 Chinese and Korean.

best,

Screen Shot 2022-06-22 at 11.40.34.png
June 22, 2022 at 10:30 am #11518431

Bigul
WPML Supporter since 01/2013

Languages: English (English )

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

Hello,

Welcome to the WPML support forum. I will do my best to help you to resolve the issue.

It looks like an expected result. Because most probably the strings of the *puttman* string domain are registered in English. Also, we have selected the *Also include translations* option. So only languages that we are translating the strings will list in that drop-down box.

The result is the same in a fresh installation also. Please refer to the attached images for more details and let us know your feedback.

--
Thanks!

Bigul

2022-06-22_15-50-39.png
2022-06-22_15-42-41.png
June 23, 2022 at 1:28 am #11524529

柳橋 昌行

Thx for supporting.

The theme ("puttman" is my original theme as child theme of the other theme) string original lang is set to Japanese already.
That is why I am confusing.
Any other thoughts??

1.png
June 23, 2022 at 6:56 am #11526317

Bigul
WPML Supporter since 01/2013

Languages: English (English )

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

Hello,

Thank you for the updates. Please confirm whether all the strings of the *puttman* string domain are registered in the Japanese language or not.

Also, does it happens with other string domains also?

--
Thanks!

Bigul

June 23, 2022 at 7:05 am #11526383

柳橋 昌行

Yes, all strings in "puttman" domain are registered in Japanese.
Also all other domains has the same problem.

June 23, 2022 at 1:46 pm #11530501

Bigul
WPML Supporter since 01/2013

Languages: English (English )

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

Hello,

Thank you for the updates. Please share the name of a couple of string domains that has the same problem. It will help us in debugging.

Also, please share with us the WordPress debug.log(not WPML debug information) for collecting more details on this. Refer to this page for instructions https://wpml.org/documentation/support/debugging-wpml/

To enable WordPress Debug log, open your wp-config.php file of site root and look for define('WP_DEBUG', false);. Change it to:

// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );
 
// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );
 
// Disable display of errors and warnings 
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );

In this case, the errors will be saved to a debug.log log file inside the */wp-content/* directory. Please do the steps to reproduce the bug and check if you are getting any errors or warnings related to WPML in the log file.

If you can paste your debug.log to http://pastebin.com/index.php and provide me that link it would be great! (This is the cleanest way because sometimes the logs are long and create a complete mess of discussion).

--
Thanks!

Bigul

June 24, 2022 at 12:53 am #11533819

柳橋 昌行

Hi

other domains are like
* all-in-one-seo-pack (origin lang: eng)
* paid-memberships-pro (origin lang: eng)
* puttman-link (origin lang: jap)

seems like no English choice comes up in the dropdown on all domains.

I also added the php code

 define 

things on wp-config.php but debug.log file is not generated automatically...

If you could, you can access to our WP admin page and see the problem directly.

best,

June 24, 2022 at 9:23 am #11536635

Bigul
WPML Supporter since 01/2013

Languages: English (English )

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

Hello,

Thank you for the details. I can reproduce the issue on your site. Please tries the following troubleshooting steps after a full site backup{mandatory} and make sure the issue is existing or not.

1) Go to WPML>>Support page, click on the Troubleshooting link (blue link in the middle of the page)

2) On the Troubleshooting page, please click on the following options of the *Clean up* section. Wait for confirmation of processing after each one.

- Clear the cache in WPML
- Remove ghost entries from the translation tables
- Fix element_type collation
- Set language information
- Fix WPML tables collation
- Cleanup and optimize string tables
- Show custom MO Files Pre-generation dialog box>>Generate .Mo files

--
Thanks!

Bigul

June 28, 2022 at 5:55 am #11556261

柳橋 昌行

I did try everything you said and no luck.
Any other thoughts??

best,

June 28, 2022 at 7:58 am #11556797

Bigul
WPML Supporter since 01/2013

Languages: English (English )

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

Hello,

Thank you for the feedback. This requires further testing. So a couple of requests.

a) Please fill the private details fields after a full site backup. Refer to the following links for more details about our private information sharing policies.

https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

hidden link

b) Please allow me to make a duplicator copy of your site using the Duplicator plugin(https://wordpress.org/plugins/duplicator/) for debugging the issue on my local server. So we can troubleshoot the issue without affecting your live site.

--
Thanks!

Bigul

June 29, 2022 at 4:59 pm #11570229

Bigul
WPML Supporter since 01/2013

Languages: English (English )

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

Hello,

Thank you for the permission. I made a copy of the site, will debug it further, and get back to you as early as possible. Please wait.

--
Thanks!

Bigul

June 30, 2022 at 4:36 pm #11579241

Bigul
WPML Supporter since 01/2013

Languages: English (English )

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

Hello,

The issue is existing on my local copy after the initial checks. Therefore consulting with our team for the expert opinion. We will get back to you as early as possible. Please wait.

--
Thanks!

Bigul

July 1, 2022 at 2:25 pm #11585601

Bigul
WPML Supporter since 01/2013

Languages: English (English )

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

Hello,

This issue is escalated to our developers for fixing and the fix will be included in WPML 4.6 version. But we have a workaround for now. Please try the following steps after a full site backup and let us know your feedback.

1) Please change this line:

<?php foreach($active_languages as $al): if($al['code']==$string_settings['strings_language']) continue; ?>

at these two locations:

wp-content/plugins/wpml-string-translation/menu/string-translation.php, Line 645
wp-content/plugins/wpml-string-translation/menu/string-translation.php, Line 723

with the following one:

<?php foreach($active_languages as $al):  ?>

2) Save the changes

3) Go to WPML > String Translation and please select Also create translations according to the .po file and choose English from the dropdown, (it should appear after the code changing), then import them.

--
Thanks!

Bigul