Skip Navigation

Open

Reported for: WPML Multilingual CMS 4.5.0

Overview of the issue

In the past, WordPress and WPML always assumed the default language of strings was English.

Though it is now possible to change the default language of strings with WPML (and therefore translate strings from another language into English), you still cannot import or export strings in English in the Import / export .po section.

Workaround

You can follow the following steps to solve the problem, while we work on a permanent solution:

  1. Make sure that you have the latest WPML version
  2. Open …/wp-content/plugins/wpml-string-translation/menu/string-translation.php file.
    You will need to modify in 3 different locations
  3. First, look for lines 640 and 748 and replace this line:
    <?php foreach($active_languages as $al): if($al['code']==$string_settings['strings_language']) continue; ?>
  4. With:
    <?php foreach($active_languages as $al):  ?>  
  5. Then, look for line 655 and remove this code:
    											if ( $al['code'] == $string_settings['strings_language'] ) {
    												continue;}
    
  6. Finally, 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.

6 Responses to “Not possible to import or export English translations in String Translation”

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>