Upload
agnes-bury
View
1.030
Download
1
Embed Size (px)
DESCRIPTION
most common mistakes done in multilingual sites created with WordPress, examples and good practices included
Citation preview
10 common mistakes WordPress developers makewhen building multilingual sites
Agnes Bury
present● community specialist at
OnTheGoSystems
● responsible for WPML showcase
● WordPress blogger
past● WordPress freelancer
Agenda
1. Common mistakesa. description, real life
examplesb. disadvantagesc. how to do it right and
how you benefit2. Experience exchange3. 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
Is this site multilingual?
Source: niromusic.com
1. Not inserting a language switcher
Possible reasons1. 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/
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
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
Redirections done right
2. Using automated translations
Why people use automated translations1. This the easiest way (not
recommended!)2. They don’t think about
search engines3. They don’t know how to
find professional translators
source: jamespaulphotography.co.uk
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
3. Mixing languages on the same page
The reasons users mix languages1. 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/
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
4. Media translation: how to do it right
● upload your image once
● provide its alternative text and title for each language
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
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
6. Not translating theme dependant stringsFrequently 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/
How to translate theme strings● using .po/.mo files and
GetText editors● from the WPML panel
How to translate theme options● use wp_options and
wpml-config.xml● check your theme in our
Compatibility program
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
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/
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
9. Ignoring eCommerce trends
source: http://trends.builtwith.com/shop/
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
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
What would you add? Discussion