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
120
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
350
Internationalization Introduction at WordCamp Bern
swissspidy
0
140
Other Decks in Technology
See All in Technology
研究開発部の紹介 / Sansan R&D Profile
sansan33
PRO
4
24k
LLM・AIエージェントシステムベストプラクティス
shibuiwilliam
6
1k
私がブラウザを自作したくなった理由
supurazako
0
120
取引先から届く 「セキュリティチェックシート」の読み解き方
kamadamakoto
0
140
Eight Engineering Unit 紹介資料
sansan33
PRO
3
8.2k
LanceDB入門
mocobeta
7
340
その“隠したつもり”が命取り ── 自前と平文をやめて「正解」に委ねる
kuroneko13
0
100
事業価値と Engineering 2026年度版
recruitengineers
PRO
47
23k
【CEDEC2026】コードレビュー支援ツール開発から学ぶ:LLMを用いた業務システムの実践的な運用設計と誤出力対策
cygames
PRO
0
650
20260807_第6回_関東kaggler会LT_claw系bot xangiと始める、"寂しくない" kaggle
sugupoko
0
250
【CEDEC2026】次世代デジタルカードゲームのサーバー設計と運用 〜『Shadowverse: Worlds Beyond』の舞台裏~
cygames
PRO
1
1.2k
20分でわかるセキュアAPI
nwiizo
2
240
Featured
See All Featured
First, design no harm
axbom
PRO
2
1.2k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.5k
Color Theory Basics | Prateek | Gurzu
gurzu
0
410
Marketing to machines
jonoalderson
1
5.7k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
280
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
270
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
200
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
470
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.5k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
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!