Slide 1

Slide 1 text

WordPress Internationalization Workflows WordCamp Johannesburg 2018

Slide 2

Slide 2 text

Pascal Birchler
 @swissspidy

Slide 3

Slide 3 text

What You Will Learn Today

Slide 4

Slide 4 text

WordPress + Internationalization

Slide 5

Slide 5 text

Making a Plugin Translation-Ready

Slide 6

Slide 6 text

Internationalization Workflow Optimization

Slide 7

Slide 7 text

Prerequisites

Slide 8

Slide 8 text

The process of creating a product in such a way that it can be easily adapted to specific local languages and cultures Internationalization (I18N)

Slide 9

Slide 9 text

The process of adapting a product or service to a particular language, culture, and desired local “look-and-feel.” Localization (L10N)

Slide 10

Slide 10 text

“Localization is like translation but with a cultural twist” Localization

Slide 11

Slide 11 text

Internationalization Done Right bit.ly/i18nDoneRight

Slide 12

Slide 12 text

WordPress I18N Efforts

Slide 13

Slide 13 text

Making WordPress Global

Slide 14

Slide 14 text

translate.wordpress.org

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

Language Packs

Slide 18

Slide 18 text

WordPress Plugin Internationalization Behind the Scenes

Slide 19

Slide 19 text

WordPress Plugin Internationalization WordPress.org

Slide 20

Slide 20 text

Writing a Plugin

Slide 21

Slide 21 text

my-plugin/ my-plugin.php readme.txt

Slide 22

Slide 22 text

Slide 23

Slide 23 text

=== My Super Awesome Plugin === Contributors: swissspidy Requires at least: 4.6 Stable tag: 1.0.0 License: GPLv2 or later My WordPress plugin that does nothing.

Slide 24

Slide 24 text

WordPress.org Plugin Directory

Slide 25

Slide 25 text

wordpress.org/plugins/my-plugin

Slide 26

Slide 26 text

translate.wordpress.org

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

wp-content/ languages/ my-plugin-de_DE.mo my-plugin-de_DE.po

Slide 29

Slide 29 text

1. Write Plugin 2. Submit to WordPres.org 3. Translate 4. Done!

Slide 30

Slide 30 text

WordPress Plugin Internationalization Private Plugin

Slide 31

Slide 31 text

Writing a Plugin

Slide 32

Slide 32 text

String Extraction

Slide 33

Slide 33 text

Slide 34

Slide 34 text

makepot grunt-wp-i18n Poedit

Slide 35

Slide 35 text

my-plugin/ my-plugin.php languages/ my-plugin.pot

Slide 36

Slide 36 text

Manual Translation

Slide 37

Slide 37 text

my-plugin/ my-plugin.php languages/ my-plugin.pot my-plugin-de_DE.po my-plugin-de_DE.mo

Slide 38

Slide 38 text

load_plugin_textdomain( 'my-plugin', false, __DIR__ . '/languages' )

Slide 39

Slide 39 text

1. Write Plugin 2. String Extraction 3. Translate 4. Load Translations 5. Done!

Slide 40

Slide 40 text

Comparison

Slide 41

Slide 41 text

WordPress.org Private Plugin - Very easy to use - Translation Platform - Just-in-time Translation Loading - Complicated process - String Extraction - No Translation Community - Manual Translation Loading

Slide 42

Slide 42 text

Introducing Traduttore

Slide 43

Slide 43 text

WordPress.org For Everyone

Slide 44

Slide 44 text

translate.wordpress.org For Everyone

Slide 45

Slide 45 text

No content

Slide 46

Slide 46 text

No content

Slide 47

Slide 47 text

How it Works

Slide 48

Slide 48 text

WP-CLI

Slide 49

Slide 49 text

# Create a POT file for the WordPress plugin in the current directory $ wp i18n make-pot . languages/my-plugin.pot

Slide 50

Slide 50 text

github.com/wp-cli/i18n-command

Slide 51

Slide 51 text

No content

Slide 52

Slide 52 text

\Required\Traduttore_Registry\add_project( 'plugin', 'my-plugin', 'https://translate.example.com/api/translations/my-plugin/' );

Slide 53

Slide 53 text

No content

Slide 54

Slide 54 text

WordPress.org & Traduttore Private Plugin - Very easy to use - Translation Platform - Just-in-time Translation Loading - Complicated process - String Extraction - No Translation Community - Manual Translation Loading

Slide 55

Slide 55 text

required.com/en/blog/

Slide 56

Slide 56 text

No content

Slide 57

Slide 57 text

github.com/wearerequired/traduttore github.com/wearerequired/traduttore-registry

Slide 58

Slide 58 text

What's Next

Slide 59

Slide 59 text

Improving Traduttore

Slide 60

Slide 60 text

Improving translate.wordpress.org

Slide 61

Slide 61 text

Gutenberg

Slide 62

Slide 62 text

JavaScript Internationalization

Slide 63

Slide 63 text

No content

Slide 64

Slide 64 text

Thank You.