This release of WPML is packed with new features, overall improvements and compatibility with WordPress 4.7.

Translation for shortcodes-based page builders

As of now, it’s a lot easier to translate sites that use page builders. In this release, we managed to add full support for page builders that use shortcodes. In the next release, we’ll also add support for other page builders, which store their design in different ways (usually in postmeta).

Fortunately, we manage to cover the full support for shortcode-based builders using WPML’s language configuration file. This means that we can add compatibility for any such page builder, without releasing new versions of WPML.

This release comes with the support for Visual Composer, Divi and Cornerstone (X Theme).

The new support means that you only need to translate the texts and not re-create the entire design per language.

To take advantage of this new integration, you’ll need to install Translation Management and String Translation. Then, configure WPML to translate using the Translation Editor.

See how this works in Dario’s video:

And, you can follow the entire description on how to translate content created by page builders.

If you want to add such support for other page builders, you’ll need to create language configuration files for them. The document on how to integrate page builders that use shortcodes with WPML explains it in detail.

New options for language switchers

WPML does a lot behind the scenes, but your visitors will always notice is the language switcher. WPML 3.6 makes it easy to create custom language switchers for themes and to display your language switchers exactly like you want them.

This release comes with a complete redesign for the language switcher. The main features are:

  • Full backward compatibility – you can upgrade safely and enjoy the new features, but you don’t need to worry about sites breaking.
  • Menu language switcher adds menu items instead of HTML – previous versions of WPML injected HTML into the menu, in order to create a language switcher item. This was OK for many themes, but not compatible with all. The new language switcher injects menu items, so it’s bulletproof for any theme. It also makes it a lot easier to style the menu language switcher.
  • Support for multiple-switchers in multiple locations – some language switchers, like the footer, can only appear once in each site. However, other switchers, such as the widget switcher, can appear in several places. Now, you can add as many as you like.
  • Twig templates for easy customization and theme embedding – the new language switcher uses Twig templates. It’s a simply templating language that doesn’t require programming to understand and modify. This makes it a lot easier to create custom language switcher. But that’s not all. Themes can now include a language switcher folder, which WPML will use. When present, WPML will get the default switcher design created by the theme.
  • Nicer GUI – a nice GUI means that it’s easier to understand the options and control them. Since this version includes a number of new options, we’ve decided that it’s also time to completely refresh the GUI. After three rounds of usability testing, we came to a design that we like. We hope that you’ll like it too.

Automatic download for WordPress language packs

When you add languages to WPML, it will automatically download the respective language pack for WordPress core. This is good for a number of reasons. Obviously, it’s nice to be able to switch the admin language and see everything localized. It’s also good for WordPress 4.7 compatibility, so that WordPress can offer this language to users.

WordPress 4.7 compatibility

We’ve been developing and testing with WordPress 4.7 since the first alphas came out. WPML 3.6 QA ran on both WordPress 4.7 and on 4.6. The most noticeable change for WordPress 4.7 is the introduction of the User Language preference. Now, WPML’s setting is merged into the WordPress setting (and WPML tells WordPress to download the language packs). There are more subtle changes for API updates and deprecated functions.

Other improvements

As always, stability, security and performance come before any new feature. This release includes a list of enhancements that solve different edge cases.

  • Improved validation of “Different languages in directories” negotiation type
  • Adjusted URL in wp_upload_dir return for when WPML is set up to use languages in domains
  • Fixed handling of slashes when copying custom fields
  • Fixed ‘Create PO file’ functionality so it includes the msgctxt when required
  • Prevent sending empty units in XLIFF files
  • Fixed GravityForms date in translation dashboard
  • Fixed issue where radio choices with long text and HTML were not being displayed
  • Fixed a compatibility issue with Yoast redirections
  • Fixed an issue with the browser redirection when using languages with regional variations
  • Fixed multisite install compatibility issue with WP 4.6+ using sunrise
  • On multisite, the main site settings are not altered anymore during sub-site setup
  • Fixed a login redirection issue in sites with languages configured as domain
  • Fixed a redirection issue Nginx servers with language configured as domain
  • Fixed issue with cloning non object values for wp_query object
  • Fixed page template synchronization if template is set to default
  • Removed Snoopy class and use WP_Http class instead (yeah, finally)
  • Fixed a compatibility issue with get_option(‘siteurl’) in sites with languages set as domain
  • Fixed WPML_Backend_Request::get_ajax_request_lang
  • Fixed \SitePress::_sync_custom_field to handle serialized data
  • Removed the restriction of only English as default language when synchronizing WP menu
  • Fixed issue in the WPML notice when adding posts from frontend
  • Fixed issue when duplicating posts that have comments to be duplicated
  • Fixed issue while dismissing admin notices from plugin that contains special chars in the title
  • Fixed issue with setting static blog page when page is permanently deleted
  • Fixed compatibility issue when using Google PageSpeed Tools in Apache or Nginx
  • Prevent double ampersand encoding in language switcher URL
  • Fixed issue where language information wasn’t saved when posts were created via AJAX call
  • The language switcher in Twenty Sixteen’s footer was cut off
  • The language switcher in Twenty Fifteen’s footer was partially hidden by the sidebar
  • Changed the message style in Sync Field Functionality
  • Added a warning about missing menu items when only one language is configured in the site
  • Improved usage of server’s resources when scanning themes or plugins for strings
  • Improved page loading and memory consumption in Theme’s and Plugin’s localization page
  • Fixed an issue when trying to register a string with 0 as name
  • Fixed an issue in double registering of Multilingual Widget content
  • Fixed an issue that was happening when you try to scan strings before completing the wizard. Now it is not allowed
  • Fixed database error when running WPML reset
  • Fixed an issue when importing large .po files

But what about other features that we talked about?

We know that the wishlist for features is always bigger than what we manage to include in each release. There are a number of features and improvements that we wanted to include in WPML 3.6, but could not, due to schedule. We hope that you know that we’re doing our very best to make everyone happy. If we promised something that it’s not here, feel free to remind us. The list of features for WPML 3.6.1 has about 30 items. The list of features for WPML 3.7 includes more than 100 things.

Download and update

As always, we highly recommend backing up your sites before updating WordPress, the theme and plugins. Everyone does their job and test for WordPress compatibility. However, you never know what surprises are going to pop up due to cross compatibility and configuration changes. No matter what we update in our sites, we always perform full backup before.

You will receive WPML updates automatically for all your registered sites (you do register all your sites, right?). You can also download WPML manually from your account. Be sure to always update all of WPML’s components together.

Feedback?

We’d love to get your feedback, ideas, suggestions and questions.

17 Responses to “WPML 3.6 – Translation for Page Builders, New Language Switcher and WP 4.7 Compatibility”

  1. Hi,

    This version 3.6 looks promising. 🙂

    Though I want to ask why is it so hard to find this version information and changelog. This page is buried in your blog while it should be easy to find on your website IMO.
    Also when one tries to update the plugin in the WP admin it gives an error.

    Thanks and best regards.

    • There is a link to release notes in the plugins admin. Also, the changelog displays this information before you update (in the standard WP location). There shouldn’t be errors on update. If you are getting errors, could you get the details and post in our support? Our supporters will be able to check the error, see what’s wrong and get it working for you for the next updates (or updates on other sites).

    • Ok, thanks.
      I found it appears to give an error (blank) only in my overall management program, for this plugin. Not when I upgrade directly on site.
      So I will open a case in your support.

  2. After this update the language switcher now is showing escaped style code like this: ESPAÑOL

    When I view source I see this: <span class="wpml-ls-native">Español</span>

    Somehow WPML is now escaping that code and it’s showing up on the site now and doesn’t look good. So I’m scrambling to fix it. Can you please a) tell me how to fix this and b) look into if it’s a bug that needs to be corrected.

    Thank you.

  3. Following up – in my post preview it is rendering the escapes. So I’ll add &amp; so you understand the issue:

    When I view source I see this: &lt;span class=&quot;wpml-ls-native&quot;&gt;Español&lt;/span&gt;

    And on the front end it looks like this: <span class="wpml-ls-native">Español</span>

    • If this is still happening after you update to WPML 3.6.2 (just released), can you please create a ticket about it in our support forum and add another comment with the link to the ticket? We’ll need more info to properly debug and resolve it for you.

  4. Compatibility with X-Theme/Cornerstone is still only partial when using the Translation manager and following the steps outlined in the video above. At this point only a few Cornerstone elements (mainly headings) get picked up as strings and made available for translation. Unfortunately this means its still not an acceptable approach to translating a site. At this point I don’t know who’s responsible for taking it the rest of the way – is it a problem on my end with the String Translation plugin, some sort of configuration error by themeco/xtheme, or a half baked implementation from wpml?

    I see in the release notes mention that the next version will have support for page editors that use postmeta – should I be waiting for that to make the leap?

    • Yup. Over the weekend we’ve tested almost every element in X Theme. We updated the config file to handle most other modules and there are a few left that we’re debugging.

    • In order to switch the language, the browser needs to go to a different URL (there’s a different URL per language for each page). This normally requires a full page reload.

    • This is coming right next. We’ve started looking at WPML and Enfold and it looks like Enfold is using shortcodes. If this is the case, we’ll be able to write a config file and push it to all WPML sites (using Enfold) without requiring an update. I’ll write a separate blog post when it’s available.

  5. Thank you for this new feature that looks really time-saving to me.
    Do you plan to make it compatible to King Composer Page Builder in the future ?

    • Compatibility with King Composer should not be a problem. In the upcoming release, we are going to include a complete (and very simple) API that allows any other author to connect page builders with WPML. We’ll document it fully. Then, we’ll be very happy to work with the authors of King Composer and make their builder and WPML play nice together.