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
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
68
Democratizing Performance
swissspidy
0
83
On Multilingual WordPress Sites
swissspidy
0
58
WordPress Internationalization Workflows
swissspidy
0
3.3k
WordPress Internationalization Workflows
swissspidy
0
130
WordPress Internationalization Workflows
swissspidy
1
1.1k
On Internationalization and Localization
swissspidy
0
260
Internationalisation in the Age of Gutenberg
swissspidy
0
300
Internationalization Introduction at WordCamp Bern
swissspidy
0
120
Other Decks in Technology
See All in Technology
エンジニアリングマネージャーの成長の道筋とキャリア / Developers Summit 2025 KANSAI
daiksy
3
1.1k
「どこから読む?」コードとカルチャーに最速で馴染むための実践ガイド
zozotech
PRO
0
570
JTCにおける内製×スクラム開発への挑戦〜内製化率95%達成の舞台裏/JTC's challenge of in-house development with Scrum
aeonpeople
0
260
機械学習を扱うプラットフォーム開発と運用事例
lycorptech_jp
PRO
0
650
20250913_JAWS_sysad_kobe
takuyay0ne
2
250
AWSを利用する上で知っておきたい名前解決のはなし(10分版)
nagisa53
10
3.2k
CDK CLIで使ってたあの機能、CDK Toolkit Libraryではどうやるの?
smt7174
4
190
なぜテストマネージャの視点が 必要なのか? 〜 一歩先へ進むために 〜
moritamasami
0
240
TS-S205_昨年対比2倍以上の機能追加を実現するデータ基盤プロジェクトでのAI活用について
kaz3284
1
220
RSCの時代にReactとフレームワークの境界を探る
uhyo
10
3.5k
未経験者・初心者に贈る!40分でわかるAndroidアプリ開発の今と大事なポイント
operando
5
750
スクラムガイドに載っていないスクラムのはじめかた - チームでスクラムをはじめるときに知っておきたい勘所を集めてみました! - / How to start Scrum that is not written in the Scrum Guide 2nd
takaking22
1
170
Featured
See All Featured
It's Worth the Effort
3n
187
28k
A designer walks into a library…
pauljervisheath
207
24k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
850
How to Ace a Technical Interview
jacobian
279
23k
GitHub's CSS Performance
jonrohan
1032
460k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
358
30k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
61k
Documentation Writing (for coders)
carmenintech
74
5k
Git: the NoSQL Database
bkeepers
PRO
431
66k
Imperfection Machines: The Place of Print at Facebook
scottboms
268
13k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Why You Should Never Use an ORM
jnunemaker
PRO
59
9.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!