Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
WordCamp Geneva: Recent I18N Improvements in WordPress
Pascal Birchler
November 18, 2016
Technology
0
94
WordCamp Geneva: Recent I18N Improvements in WordPress
Slides for my presentation at WordCamp Geneva, Switzerland, on November 18th, 2016.
Pascal Birchler
November 18, 2016
Tweet
Share
More Decks by Pascal Birchler
See All by Pascal Birchler
On Multilingual WordPress Sites
swissspidy
0
35
WordPress Internationalization Workflows
swissspidy
0
3k
WordPress Internationalization Workflows
swissspidy
0
58
WordPress Internationalization Workflows
swissspidy
1
1k
On Internationalization and Localization
swissspidy
0
120
Internationalisation in the Age of Gutenberg
swissspidy
0
240
Internationalization Introduction at WordCamp Bern
swissspidy
0
79
On Internationalization and Localization
swissspidy
0
88
Internationalization Done Right
swissspidy
0
180
Other Decks in Technology
See All in Technology
Learning to Solve Hard Minimal Problems
takmin
1
300
ソフトバンクのシナジーがもたらすクラウドソリューションについて、クラウドエンジニアが話してみた。
sbtechnight
0
300
MySQL v5.7 勉強会/study-mysql-ver-5-7
andpad
0
2k
Amplifyで Webアプリケーションの 堅固な土台をサクッと構築する方法
kawasakiteruo
0
210
質の良い”カイゼン”の為の質の良い「振り返り」
shirayanagiryuji
0
120
合同IT企業説明会から学ぶエンジニア向けの広報戦略
nagutabby
1
190
バッファープールが大きいMySQL v5.7でDROP DATABASEが詰まった原因と対策 / Causes and Remedies for DROP DATABASE Stuck in MySQL v5.7 with Large Buffer Pool
line_developers
PRO
4
730
やってみたLT会 Fleet Managerのススメ
yukiiiiikuma
PRO
0
380
psql, my favorite tool!
nuko_yokohama
1
180
インフラのテストに VPC Reachability Analyzer は外せないという話
nulabinc
PRO
2
700
ふりかえりの技術 / retrospectives
soudai
3
160
データをコネコネ!メール配信用データ生成の仕組み
kappezoro
0
110
Featured
See All Featured
The Language of Interfaces
destraynor
148
21k
Code Reviewing Like a Champion
maltzj
506
37k
Art Directing for the Web. Five minutes with CSS Template Areas
malarkey
196
9.5k
Three Pipe Problems
jasonvnalue
89
8.7k
Code Review Best Practice
trishagee
44
9.7k
Art, The Web, and Tiny UX
lynnandtonic
280
18k
Statistics for Hackers
jakevdp
782
210k
Fantastic passwords and where to find them - at NoRuKo
philnash
27
1.6k
The Straight Up "How To Draw Better" Workshop
denniskardys
225
120k
Optimizing for Happiness
mojombo
365
64k
Robots, Beer and Maslow
schacon
152
7.1k
Bootstrapping a Software Product
garrettdimon
296
110k
Transcript
Internationalization Improvements in WordPress 4.6 and Beyond
Pascal Birchler @swissspidy
Language Packs, the Early Days
Automatic Updates
None
Change Your Mind
None
Language Packs for Plugins and Themes
WordPress 4.6
Localized Datepicker
None
Language Packs More Important Than Ever
Loading Translations in Different Order
load_plugin_textdomain( 'myplugin', false, 'languages' )
wp-content/plugins/myplugin/ languages/… ! wp-content/languages/plugins/…
wp-content/languages/plugins/… ! wp-content/plugins/myplugin/ languages/…
Just-in-time Loading for Translations
wp-content/languages
// Do stuff. _e( 'Hello World’, 'myplugin' ); // …Magic
happens… // Prints: Hallo Welt
wp-content/languages/plugins/myplugin-de_DE.mo
Good bye, load_plugin_textdomain()
WordPress 4.7
User Admin Language
None
None
Back End: Français Front End: English
None
Locale Switching
switch_to_locale()
$switched = switch_to_locale( get_user_locale() ) // Do stuff. if (
$switched ) { restore_previous_locale(); }
Send Emails In the User’s Language
What About the Admin Toolbar?
None
Beyond
Preferred Languages
None
JavaScript Internationalization
// PHP: wp_localize_script( 'myplugin-script', '_myPluginL10n', array( 'helloWorld' => __( 'Hello
World','myplugin' ) ) ); // JS: alert( _myPluginL10n.helloWorld );
if ( 1 == number ) { use( _myPluginL10n.singularString );
} else { use( _myPluginL10n.pluralString ); }
wp.i18n.__( 'Hello World' )
wp-content/languages/plugins/myplugin-de_DE.json
Good bye, wp_localize_script()
User Timezones
None
Questions?
Thanks!