Widgets are not translated after import (WPML)

Some of you may experience a problem with missing widget translations after successful import. This is due to the fact that All-in-One WP Migration automatically replace Site URL on import and WPML plugin on the other hand uses unique identifier for its translation strings. This unique identifier is generated based on the translated string and if that translated string contains Site URL as some of the HTML based widgets, that unique identifier needs to be re-generated.

You can do that by running the following SQL statements directly via PHPMyAdmin or any other database client.

UPDATE wp_icl_strings SET name = CONCAT(‘widget title – ‘, MD5(value)) WHERE name LIKE ‘widget title – %’;
UPDATE wp_icl_strings SET name = CONCAT(‘widget body – ‘, MD5(value)) WHERE name LIKE ‘widget body – %’;

Please keep in mind that in your database, table wp_icl_strings may have different prefix (not wp_) so you need to adjust that.

After successful execution of the above SQL statement, your widgets will be translated properly.


Leave A Comment?