탐색 건너뛰기
27

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