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
WordCamp Geneva: Recent I18N Improvements in Wo...
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
100
Democratizing Performance
swissspidy
0
110
On Multilingual WordPress Sites
swissspidy
0
68
WordPress Internationalization Workflows
swissspidy
0
3.3k
WordPress Internationalization Workflows
swissspidy
0
150
WordPress Internationalization Workflows
swissspidy
1
1.2k
On Internationalization and Localization
swissspidy
0
280
Internationalisation in the Age of Gutenberg
swissspidy
0
330
Internationalization Introduction at WordCamp Bern
swissspidy
0
130
Other Decks in Technology
See All in Technology
【AWS】CloudTrail LakeとCloudWatch Logs Insightsの使い分け方針
tsurunosd
0
120
脳が溶けた話 / Melted Brain
keisuke69
1
1.1k
SSoT(Single Source of Truth)で「壊して再生」する設計
kawauso
2
390
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
11k
Zephyr(RTOS)でOpenPLCを実装してみた
iotengineer22
0
140
Change Calendarで今はOK?を仕組みにする
tommy0124
1
130
GitHub Advanced Security × Defender for Cloudで開発とSecOpsのサイロを超える: コードとクラウドをつなぐ、開発プラットフォームのセキュリティ
yuriemori
1
110
Bref でサービスを運用している話
sgash708
0
200
AI時代のシステム開発者の仕事_20260328
sengtor
0
300
サイボウズ 開発本部採用ピッチ / Cybozu Engineer Recruit
cybozuinsideout
PRO
10
76k
AgentCoreとLINEを使った飲食店おすすめアプリを作ってみた
yakumo
2
260
来期の評価で変えようと思っていること 〜AI時代に変わること・変わらないこと〜
estie
0
110
Featured
See All Featured
Odyssey Design
rkendrick25
PRO
2
560
Designing Powerful Visuals for Engaging Learning
tmiket
0
300
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
How to Think Like a Performance Engineer
csswizardry
28
2.5k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
110
30 Presentation Tips
portentint
PRO
1
260
WCS-LA-2024
lcolladotor
0
500
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
400
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.3k
How GitHub (no longer) Works
holman
316
150k
How to build a perfect <img>
jonoalderson
1
5.3k
The World Runs on Bad Software
bkeepers
PRO
72
12k
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!