Home » Blog » WPML versions » WPML 2.6.2 with WordPress 3.5 Support, CPT Slug Translation and Better E-Commerce

WPML 2.6.2 with WordPress 3.5 Support, CPT Slug Translation and Better E-Commerce

December 11th, 2012 by

Are you ready for WordPress 3.5? WPML 2.6.2 is! But that’s not all you’re getting. We also added the long-awaited support for localized URLs for custom post types and much improved support for WooCommerce.

WordPress 3.5 Support

WPML 2.6.2 runs smoothly on WordPress 3.5. Fortunately, most of the changes for WP 3.5 were pretty small and revolved around display updates. As always, before you upgrade to a major new WordPress version, we strongly recommend testing your site in a safe environment (like a local test machine). We did our testing with multiple themes and using several major other plugins, but it’s a complex world and you should make sure that all your plugins and theme play nice with the new WordPress version. Of course, before hitting that ‘update’ button, you should really backup your database.

Translation for Custom Post Type Slugs

CPT slug translation is a brand new and complex feature in WPML. It works well in the testing that we did, but it should be considered as experimental. If you’re seeing any glitches related to different permalink structures or with other plugins, please let us know if the support forum.

Are you using custom post types in your sites? You’ll be happy to hear that they can have different URLs per language. WPML always supported different names for different posts. From now, you will be able to customize the CPT archive URL as well. Custom post type URLs can look like this:

  • /houses/my-green-house/
  • /casas/mi-casa-verde/

To enable this feature, you need to use the String Translation module (part of the multilingual CMS package). If you’re registering custom post types manually, via PHP, add _x() calls around the slug name. WPML picks up these calls and will know that you’re translating URLs. The complete details are described in the WordPress codex entry for registering post types. When the slug goes through the _x() function, with context of URL slug, WPML detects it and registers in the String Translation table.

...

rewrite => array('slug' => _x( 'book', 'URL slug', 'your_text_domain' ));

...

It also gives these strings some VIP processing and uses them for URLs for the custom post types. Alternatively, you’re always welcome to use our Types plugin. Types has been updated to include support for localized custom post type slugs. Then, go to WPML->Translation Management->Multilingual content setup. You’ll see the new section for localizing slugs.

1. Enable global slug translation 2. Make the post type translatable and enter the slug

And then, you should see the localized slugs in for your custom post types. Enjoy!

Much Improved WooCommerce Support

David and Dominykas, which you may know from our support forum, have been busy tracing and correcting every issue related with WooCommerce Multilingual. We’re happy to announce a major new version of WooCommerce Multilingual, which makes everything run smoothly. Here is the list of enhancements and improvements that you’ll find in the new versions of WPML and WooCommerce Multilingual:

  • Allow translating the ‘Terms & Conditions’ page.
  • Register shipping methods strings for translation.
  • Register several tax-related strings for translation.
  • Fix registration of payment gateway titles and descriptions.
  • Synchronize the default attribute of a variable product across its translations.
  • Allow saving WooCommerce/Settings while using a non-default language.
  • Fix problems when the shop page is at the home page.
  • Allow using WordPress default permalink structure as well.
  • Fix amount sent to payment gateway when using multiple currencies.
  • Fix for language switcher in shop pages (fixed in WPML)
  • Fix for subscriptions module price not showing (fixed in WPML)
  • Rewrite product variation sync: each variation is related to its translations, sync becomes easier
  • Remove several PHP warnings and notices.
  • Send order status update emails in the language the order was made.

Most changes are in WooCommerce Multilingual, but there are some bugs that existed in WPML and are now fixed.

Language Switcher in WordPress Bar

Finally, WPML’s admin content language switcher has been moved from that retro round button on the admin top-left to its right position in the standard WordPress admin bar. This should solve a number of display issues with notifications, and make your WordPress admin cleaner.

Admin language switcher in the top bar

Bug Fixes

Here are the highlights for bug fixes in this release:

  • XML-RPC: We found some language inconsistencies while retrieving categories and posts.
  • Browser language detection: the previous update improved plenty but also caused an issue with redirecting for untranslated content. That’s fixed now.
  • Translation editor and custom fields: WPML used single-line spaces to edit textarea fields. Fixed by replacing with multi-line inputs.
  • Content duplication: fixed an issue with parent setting.

Help WPML by Telling About Yourself

As we go into 2013, we want to make WPML work better for you. We’ve prepared a short survey that asks about your monthly income, your offshore bank accounts and your favorite drinks. Well, not really all these. We just want to know what you’re using WordPress for, which other plugins you’re using and what themes. So, to help us prepare WPML for your needs, we’d appreciate a few minutes of your time in our survey: https://www.surveymonkey.com/s/wpml1

27 Responses to “WPML 2.6.2 with WordPress 3.5 Support, CPT Slug Translation and Better E-Commerce”

  1. I’m not sure I’ve totally understood how Types will integrates with the new CTP slug translation.
    Does it need to have the String Translation module enabled anyway or will it work on its own?

    …Because I just can’t use String Translation, as it has such bad performance issues.

    • Amir says:

      Yes. You need to use this new feature with WPML’s String Translation module. In the new WPML version, go to either WPML->Translation Management->Multilingual content setup, or WPML->Translation options and select the checkbox to enable slug translation. I’ve included screenshots of that page in the post.

      • Andrea says:

        Amir, thank you for the direction, but you would have read my whole comment, probably you wouldn’t have written directions on how to enable this feature.

        Despite all the love I have for WPML, the String Translation module gave me such a bad time – I’ve been almost kicked out from my hosting provider because of it!-, that I will never use it again until someone from WPML will tell me that they’ve solved its performance issues.

        Adding features that relies on this module make them useless to me and the fact that WPML is working to add new features instead of solving such a big issue makes me think.

  2. Sebastien says:

    Customize the CPT archive URL!! Thanks so much guys! :D

    • Amir says:

      Great! I’m happy to see that you like it. This one feature has been on top of our wishlist for a while and took a lot of effort to build.

  3. Bart De Vuyst says:

    Thank you very much. I have wantend this cpt translation option for so long. This is awesome!

  4. Matthieu says:

    I forgot to say one important thing in the survey that is a real pain in WPML.
    Managing posts that don’t have a translation in the default language is not working.
    Example, on my blog my default language is French.
    But sometimes I create a post in English and a translation of the English post in Japanese.
    When I will re-edit the English post it will break the link between the two posts.

    the entire concept of a default language (which code doesn’t appear in URL) is wrong to my opinion.

    WPML should be independent from the default language

    • Amir says:

      This doesn’t sound like an inconvenient feature, but a bug. We should fix it. Have you reported it in our forum? The support folks should first look at it and confirm the situations where it’s happening. Then, we’ll get it fixed.

  5. Riccardo says:

    The Translation for Custom Post Type Slugs is a great and welcome feature!
    Thank you for this update!
    I’m on the way for the survey right now! ;)

  6. Piet says:

    Congratulations, very happy with this update!

    Being able to translate the CPT slug is super and I also very much like the move of the backend language switcher to the admin bar!

    The only thing I do not like about this update is that it now shows everywhere the button “How to translate”. Not only is the styling of the button a bit off, I don’t want to send my clients to a “technical” page where they can download a 13MB (!!!) PDF.

    Can you please make that optional like the WPML love for example?

  7. Sirene says:

    Does Switcher language widget support the new feature : Translation for Custom Post Type Slugs ? Because i put my translation for my custom post type but the switcher language keep the original link

    • Amir says:

      It should. Maybe some checkbox is not selected. Please start a thread in our forum, include the screenshots to the admin screens and show us a link to your site. Let’s see what’s not working.

  8. Ming says:

    May I know how to update it online?

    Cheers,
    Ming

  9. Mattia Forza says:

    Hey there!

    Thanks for releasing this new great update! Finally we can translate CPT slugs: what I was most waiting for!

    Just a thing: I followed all your instructions and indeed WP shows the right slug in URLs but when I visit the page a 404 is throwed: any suggestion?

    • Amir says:

      We need to work with you to make it work. It should.

      Can you please report in our forum? Tell what URL structure you’re using and let us see the site. If there’s a problem with your specific setup, we’ll debug it and fix.

      This thing is complex and may interact with other things. Once we see it broken for you, we can fix.

  10. SARL says:

    Hi, I’ve noticed that from the post editing page where the permalink appears it doesn’t change the slug it keeps the original one even if you are on another language. So that when you click on attach post buttom it displays a 404 error and you have to change the slug on the url manually so that the good page displays. Is that normal? is it due to something that I’ve done wrong?

    • Amir says:

      It’s possible that we didn’t cover something. Can you please report what you’re doing in our support forum? Give the specifics, upload screenshots and paste the URLs that you’re seeing. If anything is wrong, we will fix it.

  11. JP says:

    I cant login to the support section of WPML!

    i cant found the place where i can introduce my credentials!!!

    • Amir says:

      I can’t see an account with the email you used in this comment. Can you use our contact page and provide your full name? See if there are other emails that you might have used. We’ll reset your password and resend it. The support folks will be back to work on Monday.
      http://wpml.org/home/contact-us/

  12. WPNinja says:

    Are you planning to support custom taxonomies slug as well?

  13. Xavi says:

    This is not working in my existing website.

    Can you tell me what changes the plugin does so I can change manually in my database?

    Thanks