Home›Support›English Support›[Resolved] "String Translation" -> "Import / Export .po" doesn't show English in DropDown
[Resolved] "String Translation" -> "Import / Export .po" doesn't show English in DropDown
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.
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.
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.
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??
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).
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
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.
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.
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.
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
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.