Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Multi-lingual sites with WordPress

Multi-lingual sites with WordPress

An introduction to building Multi-lingual sites with WordPress

7443ddca4d7693b0ffd6b29b9227d718?s=128

Rich Holman

March 02, 2012
Tweet

Other Decks in Programming

Transcript

  1. An introduction to building Multi-lingual sites with WordPress

  2. Introduction à la création d'un site multi-langues avec WordPress

  3. Introducción a la creación de un sitio múlti idiomas con

    WordPress
  4. About myself

  5. None
  6. Wordpress codex http://codex.wordpress.org/ WordPress_in_Your_Language

  7. Discovery Understanding the need

  8. Discovery - the need * Editorial - localisation * Translation

    - internationalisation * Informs solution e.g. multi-site or single site
  9. Discovery - user journeys * Site level * Post level

  10. Design Designing for multi-lingual sites

  11. Design - layout Allow enough space

  12. None
  13. None
  14. Design - layout Designing blind

  15. Design - layout RTL - flip the design

  16. None
  17. The Build Architecting a solution

  18. Language context * ?lang=es * /es/ * es. * body

    class=es
  19. HTML Language codes <html lang="en"> <html lang="es"> <html lang="fr"> http://www.w3schools.com/tags/

    ref_language_codes.asp
  20. Text Direction HTML <p dir="rtl">!"ود%&ا ه)* ل,-</p> CSS p {direction:rtl;}

  21. Character encoding Unicode & ISO 10646 <meta charset="UTF-8"> Should about

    cover everything
  22. Language files - Admin /wp-content/languages/ http://codex.wordpress.org/ WordPress_in_Your_Language

  23. None
  24. Language files - Admin * wp-config.php: single site define('WPLANG', 'pt_BR');

    multi site define('WPLANG', ''); then set in admin
  25. None
  26. Declare theme text domain <?php load_theme_textdomain('my_theme', get_template_directory() . '/ languages');

    ?>
  27. Abstract terms in theme <?php _e('Hello World', my_theme'); ?> .

    __( 'Hello World', 'my_theme' ) . http://codex.wordpress.org/ Translating_WordPress
  28. Language files - Theme * Poedit - .po > .mo

  29. None
  30. None
  31. None
  32. Customisation * Taxonomies/Tags - arghhhh * Queries - there be

    dragons * Widgets * Plugins * Feeds - flickr, facebook etc * RSS - http://codex.wordpress.org/ Customizing_Feeds
  33. Plugins * WPML * xili-language * qTranslate * Polylang *

    Google AJAX Translation * Multisite Language Switcher http://codex.wordpress.org/ Multilingual_WordPress
  34. Polylang List view WPML qTranslate

  35. qTranslate qTranslate xili Polylang Post view WPML

  36. WPML WPML xili qTranslate Polylang Categories

  37. Don’t switch between them ;) qTranslate > Polylang

  38. Translation services * ICANLOCALIZE * Community of translators * $0.07

    per word
  39. None
  40. Translation APIs * Google Translate - Pay per request $20

    per 1 M characters Limit 2M chars/day. * Bing Translator - Free
  41. To sum up...

  42. Thankyou twitter: @dogwonder