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
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
130
Democratizing Performance
swissspidy
0
120
On Multilingual WordPress Sites
swissspidy
0
71
WordPress Internationalization Workflows
swissspidy
0
3.3k
WordPress Internationalization Workflows
swissspidy
0
160
WordPress Internationalization Workflows
swissspidy
1
1.2k
On Internationalization and Localization
swissspidy
0
280
Internationalisation in the Age of Gutenberg
swissspidy
0
340
Internationalization Introduction at WordCamp Bern
swissspidy
0
130
Other Decks in Technology
See All in Technology
AIプラットフォームを運用し続けるための可観測性
tanimuyk
4
1.1k
PHP と TypeScript の型システム比較:AI 時代の「型」は誰のためにあるのか? #frontend_phpcon_do / frontend_phpcon_do_2026
shogogg
1
240
美味しいスイスチーズを作ろう🧀🐭
taigamikami
1
230
JEP 522 Deep Dive - G1 GC同期コスト削減によるスループット向上を徹底検証&解説
tabatad
1
720
タクシーアプリ『GO』の実践的データ活用
mot_techtalk
2
110
AI-DLCを活用した高品質・安全なAI駆動開発実践 / AI Driven Development with AI-DLC
yoshidashingo
0
120
AI フレンドリーなエラー監視を TypeScript で実現する
shinyaigeek
2
250
BigQuery の Cross-cloud Lakehouse への歩み
phaya72
2
540
実装は速くなった、レビューはどうする? ― 自身のレビューをAIで再現させるサーヴァントエンジニアリングのすゝめ / Implementation got faster. So what about reviews? — An invitation to Servant Engineering: Recreating your own code reviews with AI
nrslib
6
3.4k
MIERUNE JCT 発表資料「宇宙から伊能忠敬ごっこ」
syuchimu
0
170
Spring AI × MCP 入門〜AIエージェントへのツール公開、境界設計から始める最小構成 〜
yuyamiyamoto
0
210
[モダンアプリ勉強会]今更聞けないGit/GitHub入門
tsukuboshi
0
230
Featured
See All Featured
Producing Creativity
orderedlist
PRO
348
40k
Designing for Timeless Needs
cassininazir
1
250
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
280
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
1
340
Six Lessons from altMBA
skipperchong
29
4.3k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
How to train your dragon (web standard)
notwaldorf
97
6.7k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.9k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
We Have a Design System, Now What?
morganepeng
55
8.2k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.5k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
360
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!