Slide 1

Slide 1 text

Creating Multilingual WordPress Sites @shawnhooper shawnhooper.ca

Slide 2

Slide 2 text


 Director of IT @ Actionable.co
 & Freelance WordPress Developer
 Co-Organizer, WordCamp Ottawa
 Core Contributor
 
 
 Bilingual (Je parle français) Hi, I’m Shawn! @shawnhooper shawnhooper.ca

Slide 3

Slide 3 text

Let’s Learn Some Words… 
 Internationalization, Localization, Languages, Locales, Oh My! @shawnhooper shawnhooper.ca

Slide 4

Slide 4 text

“The method of human communication, either spoken or written, consisting of the use of words in a structured and conventional way” - Oxford Dictionary 
 Examples: English, French
 Spanish, Italian Language @shawnhooper shawnhooper.ca

Slide 5

Slide 5 text

A locale is a set of parameters that defines the user's language, region and any special variant preferences that the user wants to see in their user interface. 
 
 A locale identifier consists of at least a language identifier and a region identifier. - Wikipedia Locale @shawnhooper shawnhooper.ca

Slide 6

Slide 6 text

Canadian English
 en-CA US English
 en-US Canadian French 
 fr-CA Argentina Spanish 
 es-AR Spanish Columbia 
 es-CO Locale @shawnhooper shawnhooper.ca

Slide 7

Slide 7 text


 
 The process of planning and implementing products and services so that they can easily be adapted to specific local languages and culture. i18n Internationalization @shawnhooper shawnhooper.ca

Slide 8

Slide 8 text


 The process of adapting a product or content to a specific locale or market. L10n Localization @shawnhooper shawnhooper.ca

Slide 9

Slide 9 text

Localization isn’t just about words, think about: CURRENCY
 English $1,234.56
 French 1 234,56 $ Considerations… @shawnhooper shawnhooper.ca

Slide 10

Slide 10 text

Localization isn’t just about words, think about: DATES
 English (US) MM/DD/YYY (ex: 03/20/2016) English (Canada) DD/MM/YYYY (ex: 20/03/2016) Considerations… @shawnhooper shawnhooper.ca

Slide 11

Slide 11 text

Localization isn’t just about words, think about: TIME
 English (Canada) 4:30 pm French (Canada) 16h30 Considerations… @shawnhooper shawnhooper.ca

Slide 12

Slide 12 text

Gender 
 “While modern English grammar is exceptionally capable of being gender neutral, many other languages do not share this trait.”
 
 - yoavf
 
 https://core.trac.wordpress.org/ticket/42725 Considerations… @shawnhooper shawnhooper.ca

Slide 13

Slide 13 text

Localization isn’t just about words, think about: Script Direction Considerations… Left to Right Right to Left English Arabic Spanish Persian French Hebrew Greek Yiddish Latin Western Punjabi @shawnhooper shawnhooper.ca

Slide 14

Slide 14 text

@shawnhooper shawnhooper.ca

Slide 15

Slide 15 text

@shawnhooper shawnhooper.ca

Slide 16

Slide 16 text

Localization isn’t just about words, think about: TEXT LENGTH Considerations… @shawnhooper shawnhooper.ca

Slide 17

Slide 17 text

How do you want your URLs structured? 
 
 
 example.com/?lang=es
 
 example.com/en
 
 jp.example.com
 
 mywebsite.com vs. monsiteweb.com 
 
 Considerations… @shawnhooper shawnhooper.ca

Slide 18

Slide 18 text

How do you want to switch languages?
 
 
 Dropdown Menu
 
 Widget Area
 
 What if no translation is available for a specific post?
 
 What about Query String Parameters? Considerations… @shawnhooper shawnhooper.ca

Slide 19

Slide 19 text

@shawnhooper shawnhooper.ca

Slide 20

Slide 20 text

WordPress Core is translated in 110 locales. 53 translations are 100% complete, up-to- date with the most current version of WordPress. 50.788% of WordPress sites are running a translated version. WordPress @shawnhooper shawnhooper.ca

Slide 21

Slide 21 text

@shawnhooper shawnhooper.ca

Slide 22

Slide 22 text

Although WordPress comes in many languages, it does not natively support providing viewers with content in more than one language. @shawnhooper shawnhooper.ca

Slide 23

Slide 23 text

Multilingual Plugins @shawnhooper shawnhooper.ca

Slide 24

Slide 24 text

WPML Premium Plugin from OnTheGoSystems. https://wpml.org/ Supports: Posts
 Pages
 Custom Post Types
 Taxonomies
 Menus
 Theme Text
 Plugin Text @shawnhooper shawnhooper.ca

Slide 25

Slide 25 text

@shawnhooper shawnhooper.ca

Slide 26

Slide 26 text

@shawnhooper shawnhooper.ca

Slide 27

Slide 27 text

@shawnhooper shawnhooper.ca

Slide 28

Slide 28 text

@shawnhooper shawnhooper.ca

Slide 29

Slide 29 text

@shawnhooper shawnhooper.ca

Slide 30

Slide 30 text

@shawnhooper shawnhooper.ca

Slide 31

Slide 31 text

Tip: Turn off the Make Themes Work Multilingual option if you don’t need it! @shawnhooper shawnhooper.ca

Slide 32

Slide 32 text

qTranslate X Free Plugin Available on WordPress.org Supports: Posts
 Pages
 Custom Post Types
 Taxonomies
 Menus
 General Settings
 Widgets @shawnhooper shawnhooper.ca

Slide 33

Slide 33 text

@shawnhooper shawnhooper.ca

Slide 34

Slide 34 text

@shawnhooper shawnhooper.ca

Slide 35

Slide 35 text

If you disable the plugin, you’ll see
 the content for each language is wrapped in shortcodes. Shortcode Warning @shawnhooper shawnhooper.ca

Slide 36

Slide 36 text

@shawnhooper shawnhooper.ca

Slide 37

Slide 37 text

@shawnhooper shawnhooper.ca

Slide 38

Slide 38 text

@shawnhooper shawnhooper.ca

Slide 39

Slide 39 text

@shawnhooper shawnhooper.ca

Slide 40

Slide 40 text

Polylang Free Plugin in WordPress Repo + Premium “Polylang Pro” Supports: Posts
 Pages
 Media
 Taxonomies
 Menus
 Widgets @shawnhooper shawnhooper.ca

Slide 41

Slide 41 text

@shawnhooper shawnhooper.ca

Slide 42

Slide 42 text

@shawnhooper shawnhooper.ca

Slide 43

Slide 43 text

@shawnhooper shawnhooper.ca

Slide 44

Slide 44 text

@shawnhooper shawnhooper.ca

Slide 45

Slide 45 text

@shawnhooper shawnhooper.ca

Slide 46

Slide 46 text

@shawnhooper shawnhooper.ca

Slide 47

Slide 47 text

@shawnhooper shawnhooper.ca

Slide 48

Slide 48 text

@shawnhooper shawnhooper.ca

Slide 49

Slide 49 text

@shawnhooper shawnhooper.ca

Slide 50

Slide 50 text

Multisite Approach @shawnhooper shawnhooper.ca

Slide 51

Slide 51 text

There are two ways of doing this: Separate Installs of WordPress for each language (yuck!) Using WordPress Multisite with a sub-site for each language (yay!) Multisite Approach @shawnhooper shawnhooper.ca

Slide 52

Slide 52 text

FR EN ES @shawnhooper shawnhooper.ca

Slide 53

Slide 53 text


 Multisite Language Switcher
 or 
 MultilingualPress 
 plugins give you the ability link translations between the sites in a Multisite network Language Switching @shawnhooper shawnhooper.ca

Slide 54

Slide 54 text

Comparison Feature WPML qTranslateX Polylang Multisite Cost Paid Free Freemium Free Content Storage Separate Posts Single Post Separate Posts Languages in Subsites Widget Areas Needs Additional Plugins Yes Yes Yes Media With Additional Plugin No Yes Each subsite has it’s own media library Permalink Translation Yes With “Qtranslate Slug” Plugin Pro Only Yes Sync Custom Fields Yes Yes Yes No Sync Taxonomies Yes Yes Yes No Translate Strings in Themes & Plugins WPML String Translation Plugin Additional Plugins Required Additional Plugins Required Additional Plugins Required Database Impact High Low Low Low Translation Service Support ICanLocalize No Additional Plugin No @shawnhooper shawnhooper.ca

Slide 55

Slide 55 text

Theme & Plugin Translation @shawnhooper shawnhooper.ca

Slide 56

Slide 56 text

Internationalizing Themes & Plugins 
 
 In order for themes and plugins to work in multiple languages,
 they must be internationalized. 
 
 WordPress provides functions
 to retrieve strings in the right locale. @shawnhooper shawnhooper.ca

Slide 57

Slide 57 text

Internationalizing Themes & Plugins 
 
 Instead of :
 


This is my string

@shawnhooper shawnhooper.ca

Slide 58

Slide 58 text

Internationalizing Themes & Plugins 
 
 Use :
 


@shawnhooper shawnhooper.ca

Slide 59

Slide 59 text

Internationalizing Themes & Plugins 
 For strings in JavaScript, use wp_localize_script() @shawnhooper shawnhooper.ca

Slide 60

Slide 60 text

Internationalizing Themes & Plugins 
 For strings in JavaScript, use wp_localize_script() @shawnhooper shawnhooper.ca

Slide 61

Slide 61 text

.POT, .PO and .MO Files 
 Contain all the strings in your plugins and themes for a specific language. .POT = Template ( Original Strings ) .PO = Localized Version of the Strings .MO = Machine Object files (compiled .PO files) @shawnhooper shawnhooper.ca

Slide 62

Slide 62 text

.POT, .PO and .MO Files Many popular themes & plugins come with translations already provided. If not, you can manage your own translations through plugins or 3rd party applications. @shawnhooper shawnhooper.ca

Slide 63

Slide 63 text

PO Edit Desktop Application for Managing POT and PO Files Freemium Available for Windows, OSX and Linux
 (poedit.net) @shawnhooper shawnhooper.ca

Slide 64

Slide 64 text

@shawnhooper shawnhooper.ca

Slide 65

Slide 65 text

PO Edit (Statistics) @shawnhooper shawnhooper.ca

Slide 66

Slide 66 text

Content Translation @shawnhooper shawnhooper.ca

Slide 67

Slide 67 text

Please please please…. @shawnhooper shawnhooper.ca

Slide 68

Slide 68 text

Translation Services Hire a Professional Translator
 They usually charge by the word @shawnhooper shawnhooper.ca

Slide 69

Slide 69 text

Translation Services Built in Translation Services in WordPress: ICanLocalize (Works with WPML) LingoTek (Works with Polylang) @shawnhooper shawnhooper.ca

Slide 70

Slide 70 text

Contribute @shawnhooper shawnhooper.ca

Slide 71

Slide 71 text

Polyglots Team The polyglots team is responsible for ensuring WordPress is available in dozens of languages and many more regions. It’s a big job, which is why they need help from native speakers of many languages to make it possible. https://make.wordpress.org/polyglots/ @shawnhooper shawnhooper.ca

Slide 72

Slide 72 text

@shawnhooper shawnhooper.ca Polyglots @ WordCamp Europe Contributor Day 2016

Slide 73

Slide 73 text

GlotPress Developed by the WordPress Community. translate.wordpress.org @shawnhooper shawnhooper.ca

Slide 74

Slide 74 text

@shawnhooper shawnhooper.ca

Slide 75

Slide 75 text

@shawnhooper shawnhooper.ca

Slide 76

Slide 76 text

@shawnhooper shawnhooper.ca

Slide 77

Slide 77 text

@shawnhooper shawnhooper.ca

Slide 78

Slide 78 text

@shawnhooper shawnhooper.ca

Slide 79

Slide 79 text

Thank you! Merci! Gracias!
 Slides: shawnhooper.ca
 E-Mail: [email protected]
 Twitter: @shawnhooper
 WordPress Slack: shooper @shawnhooper shawnhooper.ca