WPML
Status
Open
Reported for
WPML String Translation 3.2.14
Topic tags
Feature request

Overview of the issue

When strings are automatically registered for translation in WPML String Translation, they are assigned English as the default source language, even if English is not installed or default language on the site.

Workaround

Please, make sure of having a full site backup of your site before proceeding.


  • Open …/wp-content/plugins/wpml-string-translation/classes/filters/autoregister/class-wpml-autoregister-save-strings.php file.

  • Look for line 67.

  • Replace:
    			$domain_lang = $flag ? $this->sitepress->get_user_admin_language( get_current_user_id() ) : 'en';

  • With:
    			$domain_lang = $flag ? $this->sitepress->get_user_admin_language( get_current_user_id() ) : apply_filters('wpml_default_language', NULL );

Note: please use this workaround with caution as it may bring potential performance issues.

All known issues →