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
Pascal Birchler
November 18, 2016
Technology
150
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
WordCamp Geneva: Recent I18N Improvements in WordPress
Slides for my presentation at WordCamp Geneva, Switzerland, on November 18th, 2016.
Pascal Birchler
November 18, 2016
More Decks by Pascal Birchler
See All by Pascal Birchler
Client-side media processing in WordPress
swissspidy
0
140
Democratizing Performance
swissspidy
0
130
On Multilingual WordPress Sites
swissspidy
0
77
WordPress Internationalization Workflows
swissspidy
0
3.4k
WordPress Internationalization Workflows
swissspidy
0
160
WordPress Internationalization Workflows
swissspidy
1
1.2k
On Internationalization and Localization
swissspidy
0
290
Internationalisation in the Age of Gutenberg
swissspidy
0
360
Internationalization Introduction at WordCamp Bern
swissspidy
0
140
Other Decks in Technology
See All in Technology
指示待ちから変化に応じるClaude Codeへ!~環境からAgentへの帰り道を作る~
gotalab555
8
1.7k
internal/testlog で遊ぼう
rokuosan
0
420
hookで自作する Claude Code の「実況ボード」
shinyasaita
2
250
カーネルまで探検して理解するふたつの自動計装
sumiyae
0
340
AWSとGitHub Actionsの責任境界と 組織で安全に使用する取り組み
nealle
1
230
みてねにおけるAI-DLC導入活動とAIドリブン開発の現在地/JAWS-UG AI-DLC #2
isaoshimizu
2
300
APIセキュリティを組織で実現するには~注力する点と設計・実装に入れたい対策~
riiimparm
2
800
暗号化?某ファイルストレージはどうなるの!? 3rd Partyとうまく付き合う秘密度ラベル設計
kasada
0
220
Data Hubグループ 紹介資料
sansan33
PRO
0
3.2k
『自分で判断できるか』を基準に、プロダクトのハンズオン研修でAI利用の線を引いてみた / Where We Drew the Line on AI in Hands-on Training
honyanya
1
490
分割40%キーボードにスムーズに入門するには
hoto17296
1
200
「ミスを許さない手順書」を作ってみた 〜 個人的にはこれ以上できることはあまりなさそう/20260827-ssmjp-operation-procedure-update
opelab
16
17k
Featured
See All Featured
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
490
AI: The stuff that nobody shows you
jnunemaker
PRO
9
950
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.1k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
The Curse of the Amulet
leimatthew05
2
14k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.3k
Designing Experiences People Love
moore
143
24k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
67k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Marketing to machines
jonoalderson
1
5.7k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.6k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
4.5k
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!