Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
GWTD: I18N Improvements in WordPress 4.6 And Be...
Search
Pascal Birchler
November 12, 2016
Programming
0
69
GWTD: I18N Improvements in WordPress 4.6 And Beyond
Slides for my presentation at the 2nd Global WordPress Translation Day on November 12th, 2016.
Pascal Birchler
November 12, 2016
Tweet
Share
More Decks by Pascal Birchler
See All by Pascal Birchler
Client-side media processing in WordPress
swissspidy
0
41
Democratizing Performance
swissspidy
0
66
On Multilingual WordPress Sites
swissspidy
0
56
WordPress Internationalization Workflows
swissspidy
0
3.2k
WordPress Internationalization Workflows
swissspidy
0
110
WordPress Internationalization Workflows
swissspidy
1
1.1k
On Internationalization and Localization
swissspidy
0
230
Internationalisation in the Age of Gutenberg
swissspidy
0
290
Internationalization Introduction at WordCamp Bern
swissspidy
0
110
Other Decks in Programming
See All in Programming
generative-ai-use-cases(GenU)の推しポイント ~2025年4月版~
hideg
1
390
エンジニアが挑む、限界までの越境
nealle
1
330
Golangci-lint v2爆誕: 君たちはどうすべきか
logica0419
1
250
AWS Summit Hong Kong 2025: Reinventing Programming - How AI Transforms Our Enterprise Coding Approach
dwchiang
0
140
M5UnitUnified 最新動向 2025/05
gob
0
140
VitestのIn-Source Testingが便利
taro28
8
2.4k
知識0からカンファレンスやってみたらこうなった!
syossan27
4
130
Instrumentsを使用した アプリのパフォーマンス向上方法
hinakko
0
240
ニーリーQAのこれまでとこれから
nealle
2
770
JAWS DAYS 2025 re_Cheers: WEB
komakichi
0
110
今話題のMCPサーバーをFastAPIでサッと作ってみた
yuukis
0
130
「理解」を重視したAI活用開発
fast_doctor
0
300
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.7k
Automating Front-end Workflow
addyosmani
1370
200k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Facilitating Awesome Meetings
lara
54
6.3k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
52
2.5k
VelocityConf: Rendering Performance Case Studies
addyosmani
329
24k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
The Invisible Side of Design
smashingmag
299
50k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
2.9k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
120
52k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
Transcript
Internationalization Improvements in WordPress 4.6 and Beyond
Pascal Birchler @swissspidy
First, Some History
Language Packs
Automatic Updates
Language Chooser
None
Change Your Mind
None
Language Packs for Plugins and Themes
WordPress 4.6
Localized Datepicker
None
Bonus: wp_add_inline_script()
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/…
On Demand Translations™
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
Demo
Good bye, load_plugin_textdomain()
WordPress 4.7
User Admin Language
None
None
Back End: Español 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
Demo
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
None
Good bye, wp_localize_script()
User Timezones
None
Open Floor
Thanks!