Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Creating a multilingual site 
with WPML 
+ 
Anthony Hortin 
@maddisondesigns 
maddisondesigns.com
About me 
Designer/Developer @ Maddison Designs 
! 
WordPress Theme & Plugin Developer 
! 
WordPress Theme & Plugin Direct...
Last month [May 2014], for the first time 
in history, the non-English downloads of 
WordPress passed the English download...
Making your Dashboard Multilingual
Changing (Dashboard) languages is now even easier
Making your theme Translatable 
__( $text, $domain ) 
(two underscores) 
$translated = __( ‘Hello World!’, ‘mytextdomain’ ...
_e( $text, $domain ) 
_e( ‘Some text to translate and display.’, ‘mytextdomain’ ); 
The same as __() except it echoes the ...
_n( $single, $plural, $number, $domain ) 
_n( ‘There is a comment’, ‘There are comments’, get_comments_number(), ‘mytextdo...
_x( $text, $context, $domain ) 
_x( ‘post link’, ‘A link to the post’, ‘mytextdomain’ ); 
_x( ‘post link’, ‘Submit a link’...
_ex( $text, $context, $domain ) 
_ex( ‘post link’, ‘A link to the post’, ‘mytextdomain’ ); 
_ex( ‘post link’, ‘Submit a li...
_nx( $single, $plural, $number, $context, $domain ) 
_nx( ‘A comment!’, ‘Yay! Multiple comments!’, $number, ‘Comments titl...
Making your Content Translatable 
With the WPML plugins, you can… 
! 
- provide your content in over 40 languages 
! 
- gi...
After activating, click Configure to step through the setup process
Select your primary language
Select the languages your want to provide on your site
Set the Language Switcher options
When editing content, you now have a new Language panel
Add your content for each of your langauges
Easily view which pages have been translated
Easily switch views on the front-end with the language switchers
Voilà, c'est français! C'est bon!
You can only switch languages on pages that are translated
Where to Go for Help 
Translating WordPress 
http://codex.wordpress.org/Translating_WordPress 
! 
Official WordPress Trans...
Questions? 
I’m Anthony Hortin 
You can find me here 
! 
@maddisondesigns 
maddisondesigns.com 
! 
@easywpguide 
easywpgui...
Creating a multilingual site with WPML
Creating a multilingual site with WPML
Upcoming SlideShare
Loading in …5
×

Creating a multilingual site with WPML

2,237 views

Published on

In the presentation I show you how you can make your theme translatable, whilst developing it. I also show you how to create a multilingual WordPress site using the WPML Multilingual plugin, once you've got your site up and running.

This was presented at our recent WP Melbourne WordPress Meetup:-
http://www.meetup.com/WordPress-Melbourne/

Published in: Internet
  • Be the first to comment

Creating a multilingual site with WPML

  1. 1. Creating a multilingual site with WPML + Anthony Hortin @maddisondesigns maddisondesigns.com
  2. 2. About me Designer/Developer @ Maddison Designs ! WordPress Theme & Plugin Developer ! WordPress Theme & Plugin Directory contributor ! Provides support on official WordPress Support Forum ! Created Easy WP Guide (over 100K downloads) ! Co-Organiser Melbourne WordPress WordCamp 2013 ! Co-Organiser for monthly WP Melbourne WordPress Meetups
  3. 3. Last month [May 2014], for the first time in history, the non-English downloads of WordPress passed the English downloads. In the future, if we do our job right, the usage of WordPress will democratise publishing. It will resemble every language in the world. “ — Matt Mullenweg
  4. 4. Making your Dashboard Multilingual
  5. 5. Changing (Dashboard) languages is now even easier
  6. 6. Making your theme Translatable __( $text, $domain ) (two underscores) $translated = __( ‘Hello World!’, ‘mytextdomain’ ); The most basic translation function. Returns the text in the correct language.
  7. 7. _e( $text, $domain ) _e( ‘Some text to translate and display.’, ‘mytextdomain’ ); The same as __() except it echoes the text instead of returning the value.
  8. 8. _n( $single, $plural, $number, $domain ) _n( ‘There is a comment’, ‘There are comments’, get_comments_number(), ‘mytextdomain’ ); Return the plural or single form based on the $number
  9. 9. _x( $text, $context, $domain ) _x( ‘post link’, ‘A link to the post’, ‘mytextdomain’ ); _x( ‘post link’, ‘Submit a link’, ‘mytextdomain’ ); Used when there’s the chance the text could be found in more than two places, but with different context. Allows you to provide a short description to clarify the text being translated.
  10. 10. _ex( $text, $context, $domain ) _ex( ‘post link’, ‘A link to the post’, ‘mytextdomain’ ); _ex( ‘post link’, ‘Submit a link’, ‘mytextdomain’ ); The same as _x() except it echoes the text instead of returning the value.
  11. 11. _nx( $single, $plural, $number, $context, $domain ) _nx( ‘A comment!’, ‘Yay! Multiple comments!’, $number, ‘Comments title’, ‘mytextdomain’ ); A hybrid of _n() and _x(). It supports contexts and plurals.
  12. 12. Making your Content Translatable With the WPML plugins, you can… ! - provide your content in over 40 languages ! - give your site visitors handy tools like ‘language switchers’ ! - access powerful translation management tools ! - get easy access to professional translators (for a cost) ! - make your WooCommerce store multilingual ! - translate theme & plugin texts
  13. 13. After activating, click Configure to step through the setup process
  14. 14. Select your primary language
  15. 15. Select the languages your want to provide on your site
  16. 16. Set the Language Switcher options
  17. 17. When editing content, you now have a new Language panel
  18. 18. Add your content for each of your langauges
  19. 19. Easily view which pages have been translated
  20. 20. Easily switch views on the front-end with the language switchers
  21. 21. Voilà, c'est français! C'est bon!
  22. 22. You can only switch languages on pages that are translated
  23. 23. Where to Go for Help Translating WordPress http://codex.wordpress.org/Translating_WordPress ! Official WordPress Translators Team Blog http://make.wordpress.org/polyglots WPML http://wpml.org ! WPML Getting Started Guide http://wpml.org/documentation/getting-started-guide ! Translating your Theme http://code.tutsplus.com/tutorials/translating-your-theme--wp-25014
  24. 24. Questions? I’m Anthony Hortin You can find me here ! @maddisondesigns maddisondesigns.com ! @easywpguide easywpguide.com ! ! ! !

×