$30 off During Our Annual Pro Sale. View Details »
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
76
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
84
Democratizing Performance
swissspidy
0
91
On Multilingual WordPress Sites
swissspidy
0
62
WordPress Internationalization Workflows
swissspidy
0
3.3k
WordPress Internationalization Workflows
swissspidy
0
140
WordPress Internationalization Workflows
swissspidy
1
1.1k
On Internationalization and Localization
swissspidy
0
270
Internationalisation in the Age of Gutenberg
swissspidy
0
320
Internationalization Introduction at WordCamp Bern
swissspidy
0
120
Other Decks in Programming
See All in Programming
20251212 AI 時代的 Legacy Code 營救術 2025 WebConf
mouson
0
210
Developing static sites with Ruby
okuramasafumi
0
320
從冷知識到漏洞,你不懂的 Web,駭客懂 - Huli @ WebConf Taiwan 2025
aszx87410
2
2.9k
Vibe codingでおすすめの言語と開発手法
uyuki234
0
110
これならできる!個人開発のすゝめ
tinykitten
PRO
0
120
안드로이드 9년차 개발자, 프론트엔드 주니어로 커리어 리셋하기
maryang
1
130
Graviton と Nitro と私
maroon1st
0
130
大規模Cloud Native環境におけるFalcoの運用
owlinux1000
0
190
Full-Cycle Reactivity in Angular: SignalStore mit Signal Forms und Resources
manfredsteyer
PRO
0
170
まだ間に合う!Claude Code元年をふりかえる
nogu66
5
890
認証・認可の基本を学ぼう前編
kouyuume
0
260
組み合わせ爆発にのまれない - 責務分割 x テスト
halhorn
1
160
Featured
See All Featured
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Music & Morning Musume
bryan
46
7k
Evolving SEO for Evolving Search Engines
ryanjones
0
73
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.6k
Raft: Consensus for Rubyists
vanstee
141
7.2k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
100
A Modern Web Designer's Workflow
chriscoyier
698
190k
Visualization
eitanlees
150
16k
Building Flexible Design Systems
yeseniaperezcruz
330
39k
Believing is Seeing
oripsolob
0
15
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
70
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!