10 common mistakes WordPress developers make when building multilingual sites

  • 1,037 views
Uploaded on

most common mistakes done in multilingual sites created with WordPress, examples and good practices included

most common mistakes done in multilingual sites created with WordPress, examples and good practices included

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
1,037
On Slideshare
0
From Embeds
0
Number of Embeds
5

Actions

Shares
Downloads
6
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. 10 common mistakes WordPress developers make when building multilingual sites
  • 2. Agnes Bury present ● community specialist at OnTheGoSystems ● responsible for WPML showcase ● WordPress blogger past ● WordPress freelancer
  • 3. Agenda 1. Common mistakes a. description, real life examples b. disadvantages c. how to do it right and how you benefit 2. Experience exchange 3. Prizes for winners Prizes for active attendees ● one WPML license WordPress Multilingual Plugin ● two Toolset licenses Toolset Plugins Let You Develop WordPress Sites Without PHP more at wp-types.com
  • 4. Is this site multilingual? Source: niromusic.com
  • 5. 1. Not inserting a language switcher Possible reasons 1. Oops. I did forgot. 2. There is a language switcher, you just didn’t notice it. 3. I don’t need a language switcher source: http://foto-factory.com/
  • 6. Browser language based redirection If you rely on redirection instead of using a language switcher ● your site might not get indexed ● you may irritate your users ● if not all pages have translations, users might feel lost ● users might not realise that the site in available in other languages
  • 7. How to do it right? ● Insert your language switcher for each page ● Make sure it stands out ● Cross link all your pages ● If you want to redirect your visitors, do it right: ○ use js and cookies approach ○ do it only if a translation exists source: destibationvarsovie.com
  • 8. Redirections done right
  • 9. 2. Using automated translations Why people use automated translations 1. This the easiest way (not recommended!) 2. They don’t think about search engines 3. They don’t know how to find professional translators source: jamespaulphotography.co.uk
  • 10. 2. Using automated translations Disadvantages ● poor quality content ● translations might not get indexed How to do it right ● keep each page translated on a separate URL ● always provide good quality translations made by a human Source: http://googlewebmastercentral.blogspot.com/2010/03/working-with-multilingual-websites.html
  • 11. 3. Mixing languages on the same page The reasons users mix languages 1. they don’t know how to translate specific elements 2. their multilingual plugin does not support translation of all elements 3. they don’t think about search engines source:http://kjjdentaloffice.co.il/
  • 12. 4. Not translating media Common mistakes ● ignoring titles and alts ● all media titles and alts in the site main language ● uploading the same image for each language source: http://oneferro.com source: http://ricette.donnaecasa.com
  • 13. 4. Media translation: how to do it right ● upload your image once ● provide its alternative text and title for each language
  • 14. 5. Not translating widgets Common mistakes ● all sidebar strings in site main language ● language “mix” in titles ● side by side translation source: fotomarathon.desource: oneferro.com
  • 15. 5. Not translating widgets Make your widgets translation ready ● WordPress default widgets will appear in WPML String translation ● custom widgets coded correctly (apply_filters for widget_title and widget_text) will appear in String translation ● use Widget Logic plugin for all other cases using Widget Logic plugin using WPML panel
  • 16. 6. Not translating theme dependant strings Frequently skipped strings ● ‘posted in’ ● ‘category’ ● ‘Error 404 - page not found’ ● ‘no comments’ ● ‘read more’ ● strings coming from your theme options Source: http://www.eliplay.eu/nl/blog/
  • 17. How to translate theme strings ● using .po/.mo files and GetText editors ● from the WPML panel
  • 18. How to translate theme options ● use wp_options and wpml-config.xml ● check your theme in our Compatibility program
  • 19. 7. Hard coding language dependent strings ● Bad <?php echo ‘Error 404: Page not found’; ?> <input type=”button” name=”buy- button” value=”Buy now!” /> ● Good <?php _e(‘Error 404: Page not found’, ‘my-textdomain’) ?> <input type=”button” name=”buy- button” value=”<?php esc_attr_e(‘Buy now!’, ‘my-textdomain’) ?>” /> source: www.studying-in-england.org
  • 20. i18n and what to internationalize ● Basic strings _e, __ ● Variables printf(__( 'Your city is %s.', 'my-theme' ),$city); ● Plurals _n, _n_noop ● Context _x ● Handling JavaScript files wp_localize_script() ● Escaping strings esc_html_e() esc_attr_e() ● Date and number functions number_format_i18n(), date_i18n() Source: https://make.wordpress.org/docs/plugin-developer-handbook/15-internationalization/
  • 21. 8. Ignoring non-techie users’ needs ● can you copy from the original? ● can you change your admin language? ● how about menu synchronization? ● how easy will you add another language? ● turn ordinary users into translators
  • 22. 9. Ignoring eCommerce trends source: http://trends.builtwith.com/shop/
  • 23. WooCommerce Multilingual plugin ● The number of WP eCommerce shops is rapidly growing ● check ahead if your multilingual plugin supports eCommerce ● don’t discourage your customers with an untranslated checkout process
  • 24. 10. Ignoring WordPress compatibility ● Don’t let new WordPress releases be a surprise for your multilingual site ● Make sure your multilingual plugin is kept up to date with WordPress releases
  • 25. What would you add? Discussion