Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
WordCamp Geneva: Recent I18N Improvements in Wo...
Search
Pascal Birchler
November 18, 2016
Technology
0
140
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
Client-side media processing in WordPress
swissspidy
0
79
Democratizing Performance
swissspidy
0
88
On Multilingual WordPress Sites
swissspidy
0
60
WordPress Internationalization Workflows
swissspidy
0
3.3k
WordPress Internationalization Workflows
swissspidy
0
130
WordPress Internationalization Workflows
swissspidy
1
1.1k
On Internationalization and Localization
swissspidy
0
260
Internationalisation in the Age of Gutenberg
swissspidy
0
320
Internationalization Introduction at WordCamp Bern
swissspidy
0
120
Other Decks in Technology
See All in Technology
不確実性に備える ABEMA の信頼性設計とオブザーバビリティ基盤
nagapad
4
9.1k
"なるべくスケジューリングしない" を実現する "PreferNoSchedule" taint
superbrothers
0
120
How native lazy objects will change Doctrine and Symfony forever
beberlei
1
110
小規模チームによる衛星管制システムの開発とスケーラビリティの実現
sankichi92
0
150
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
3.2k
mablでリグレッションテストをデイリー実行するまで #mablExperience
bengo4com
0
430
『星の世界の地図の話: Google Sky MapをAI Agentでよみがえらせる』 - Google Developers DevFest Tokyo 2025
taniiicom
0
430
研究開発部メンバーの働き⽅ / Sansan R&D Profile
sansan33
PRO
3
21k
レガシーで硬直したテーブル設計から変更容易で柔軟なテーブル設計にする
red_frasco
4
640
名刺メーカーDevグループ 紹介資料
sansan33
PRO
0
970
Data Hubグループ 紹介資料
sansan33
PRO
0
2.3k
Digitization部 紹介資料
sansan33
PRO
1
6k
Featured
See All Featured
Music & Morning Musume
bryan
46
7k
Thoughts on Productivity
jonyablonski
73
4.9k
How STYLIGHT went responsive
nonsquared
100
5.9k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3k
Balancing Empowerment & Direction
lara
5
770
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.1k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Testing 201, or: Great Expectations
jmmastey
46
7.8k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.8k
Building Applications with DynamoDB
mza
96
6.8k
How to train your dragon (web standard)
notwaldorf
97
6.4k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
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!