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: Strings are not registering for translation

Solution:Strings are not registering for translation because of a database error. Somehow *mo_string* column is missing in *icl_string_translations* table. It works after running the following MySQL query

ALTER TABLE wp_icl_string_translations
ADD COLUMN mo_string longtext AFTER value;

Relevant Documentation:

100% of people find this useful.

This topic contains 6 replies, has 2 voices.

Last updated by Joeri 1 year ago.

Assigned support staff: Bigul.

Author Posts
September 28, 2018 at 4:10 pm #2774381

Joeri

Hello Bigul,

Thank you for your reply. I will update the database table. I don't know if it has anything to do with this issue but I have added some php strings to my theme and now I want to translate these strings. If I scan the theme it says there are 81 strings but I don't see any strings in string-translation.

Hopefully I can ask you this here also.

Best regards.

September 28, 2018 at 4:24 pm #2774414

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

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

Please visit WPML>>String Translation, then search for one of the strings (scanned today) and make sure you are getting the expected result or not.

Please share with me the WordPress debug.log (not WPML debug information). Please check this page for instructions https://wpml.org/documentation/support/debugging-wpml/

To enable it, open your wp-config.php file 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 );

// Use dev versions of core JS and CSS files (only needed if you are modifying these core files)
define( 'SCRIPT_DEBUG', true );

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 you are getting any errors or warning 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

October 9, 2018 at 12:34 pm #2799991

Joeri

Hello Bigul,

I have set the debug strings and followed the same steps for adding theme strings to string translation. Unfortunately there are not visible.

Here is the debug.log: https://pastebin.com/Ag51r0Z7

Best regards,

Joeri.

October 10, 2018 at 8:01 am #2803284

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi Joeri,

Thank you for the updates. But I am not able to access the *debug.log* file, the Pastebin is showing the following notice.

This is a private paste. If you created this paste, please login to view it.

Please share me a part of the PHP code you are using to display the string for a better understanding.

--
Thanks!

Bigul

October 10, 2018 at 9:23 am #2803621

Joeri

Hi Bigul,

Ok, I thought you would have a Pastebin account so you could access the file but maybe it doesn't work that way. 🙂 I have changed the access of the file so you should be able to see it now.

The PHP code I use for the string is:

<?php _e('Party for the animals, represented in (local) governments','sage'); ?>

I also find it strange that I don't see any strings within string translation. There are no strings at all.

Best regards,

Joeri.

October 10, 2018 at 3:47 pm #2805079

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi Joeri,

Thank you for the updates. I can see some DB errors related to WPML in the *debug.log*. *mo_string* is missing in *icl_string_translations* table. Maybe it will be related. Please run the following query(table prefix will differ in your case) using a tool like PHPMyAdmin and check the issue is existing or not.

ALTER TABLE wp_icl_string_translations
ADD COLUMN mo_string longtext AFTER value;

I have tried with the code you have shared and it showing the expected result for me in my test copy. Please check the attached image.

--
Thanks!

Bigul

October 12, 2018 at 3:09 pm #2812390

Joeri

My issue is resolved now. Thank you!