By default, WordPress accepts a single language only. In this topic, I talk about the possibility to have a multilingual WordPress site.
Event 1: WordCamp Denpasar 2016
Link: https://2016.denpasar.wordcamp.org/
Event 2: WordCamp Manila 2016
Link: https://2016.manila.wordcamp.org/
6. WordCamp Denpasar 2016 - WordCamp Manila 2016
i18n -> l10n -> Multilingual
Internationalization (i18n) is the process of
developing your theme/plugin language, so it can
easily be translated into other languages.
Localization (l10n) describes the subsequent
process of translating an internationalized
theme/plugin.
Multilingual means there are more than one
language in sites.
7. WordCamp Denpasar 2016 - WordCamp Manila 2016
Internationalization
Wrong
echo 'WordPress is the best!';
Right (use gettext functions)
echo __( 'WordPress is the best!', 'my-text-domain' );
Source: https://developer.wordpress.org/themes/functionality/internationalization/
8. WordCamp Denpasar 2016 - WordCamp Manila 2016
Localization
File Types
● POT (Portable Object Template)
#: plugin-name.php:123
msgid "Page Title"
msgstr ""
● PO (Portable Object)
#: plugin-name.php:123
msgid "Page Title"
msgstr "Título de la página"
● MO (Machine Object)
Source: https://developer.wordpress.org/themes/functionality/localization/
10. WordCamp Denpasar 2016 - WordCamp Manila 2016
Consideration: Human translations
Bots and visitors
● LOVE human translations
● HATE automated translations
11. WordCamp Denpasar 2016 - WordCamp Manila 2016
Consideration: All elements get translated
One language per page
● Posts / pages
● Menus
● Taxonomies and terms
● Custom fields
● Images
● Widgets
● Theme/plugin/core texts
● Theme/plugin options
12. WordCamp Denpasar 2016 - WordCamp Manila 2016
Consideration: All elements get translated
17. WordCamp Denpasar 2016 - WordCamp Manila 2016
Approaches
● One language per post
- WPML - Polylang - Bogo
● All language content in a single post
- qTranslate (X)
● Each language is a sub-site of multi-site
network
- Multilingual Press
18. WordCamp Denpasar 2016 - WordCamp Manila 2016
Tips
● Themes and plugins are ready for localization
and internationalization.
● When the things are complicated
(WooCommerce, listing site, LMS, etc), check
more about:
○ The compatibility
○ Price (free - paid)
○ Custom coding
● Test and backup.