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

Rich Holman

March 02, 2012
Tweet

Other Decks in Programming

Transcript

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  4. About myself

    View full-size slide

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

    View full-size slide

  6. Discovery
    Understanding the need

    View full-size slide

  7. Discovery - the need
    * Editorial - localisation
    * Translation - internationalisation
    * Informs solution e.g. multi-site or
    single site

    View full-size slide

  8. Discovery - user journeys
    * Site level
    * Post level

    View full-size slide

  9. Design
    Designing for multi-lingual sites

    View full-size slide

  10. Design - layout
    Allow enough space

    View full-size slide

  11. Design - layout
    Designing blind

    View full-size slide

  12. Design - layout
    RTL - flip the design

    View full-size slide

  13. The Build
    Architecting a solution

    View full-size slide

  14. Language context
    * ?lang=es
    * /es/
    * es.
    * body class=es

    View full-size slide

  15. HTML Language codes



    http://www.w3schools.com/tags/
    ref_language_codes.asp

    View full-size slide

  16. Text Direction
    HTML
    !"ود%&ا ه)* ل,-
    CSS
    p {direction:rtl;}

    View full-size slide

  17. Character encoding
    Unicode & ISO 10646

    Should about cover everything

    View full-size slide

  18. Language files - Admin
    /wp-content/languages/
    http://codex.wordpress.org/
    WordPress_in_Your_Language

    View full-size slide

  19. Language files - Admin
    * wp-config.php:
    single site define('WPLANG', 'pt_BR');
    multi site define('WPLANG', ''); then
    set in admin

    View full-size slide

  20. Declare theme text domain
    load_theme_textdomain('my_theme',
    get_template_directory() . '/
    languages'); ?>

    View full-size slide

  21. Abstract terms in theme

    . __( 'Hello World', 'my_theme' ) .
    http://codex.wordpress.org/
    Translating_WordPress

    View full-size slide

  22. Language files - Theme
    * Poedit - .po > .mo

    View full-size slide

  23. Customisation
    * Taxonomies/Tags - arghhhh
    * Queries - there be dragons
    * Widgets
    * Plugins
    * Feeds - flickr, facebook etc
    * RSS - http://codex.wordpress.org/
    Customizing_Feeds

    View full-size slide

  24. Plugins
    * WPML
    * xili-language
    * qTranslate
    * Polylang
    * Google AJAX Translation
    * Multisite Language Switcher
    http://codex.wordpress.org/
    Multilingual_WordPress

    View full-size slide

  25. Polylang
    List view
    WPML
    qTranslate

    View full-size slide

  26. qTranslate
    qTranslate
    xili
    Polylang
    Post view
    WPML

    View full-size slide

  27. WPML
    WPML
    xili
    qTranslate
    Polylang
    Categories

    View full-size slide

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

    View full-size slide

  29. Translation services
    * ICANLOCALIZE
    * Community of translators
    * $0.07 per word

    View full-size slide

  30. Translation APIs
    * Google Translate - Pay per request
    $20 per 1 M characters
    Limit 2M chars/day.
    * Bing Translator - Free

    View full-size slide

  31. To sum up...

    View full-size slide

  32. Thankyou
    twitter: @dogwonder

    View full-size slide