Skip Navigation

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.

Leave a Reply

Please stay on topic and be respectful to others. If you need help with issues not related to this post, use our Support Forum to start a chat or submit a ticket.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>