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
120
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
31
Democratizing Performance
swissspidy
0
62
On Multilingual WordPress Sites
swissspidy
0
54
WordPress Internationalization Workflows
swissspidy
0
3.2k
WordPress Internationalization Workflows
swissspidy
0
98
WordPress Internationalization Workflows
swissspidy
1
1.1k
On Internationalization and Localization
swissspidy
0
220
Internationalisation in the Age of Gutenberg
swissspidy
0
280
Internationalization Introduction at WordCamp Bern
swissspidy
0
110
Other Decks in Technology
See All in Technology
Log Analytics を使った実際の運用 - Sansan Data Hub での取り組み
sansantech
PRO
0
160
株式会社Awarefy(アウェアファイ)会社説明資料 / Awarefy-Company-Deck
awarefy
3
12k
プルリクエストレビューを終わらせるためのチーム体制 / The Team for Completing Pull Request Reviews
nekonenene
4
1.9k
Ruby on Railsで持続可能な開発を行うために取り組んでいること
am1157154
3
180
エンジニアの健康管理術 / Engineer Health Management Techniques
y_sone
8
5.8k
人生を左右する「即答」のススメ: 一瞬の判断を間違えないためにするべきこと
takasyou
7
870
MIMEと文字コードの闇
hirachan
2
1.5k
Qiita Organizationを導入したら、アウトプッターが爆増して会社がちょっと有名になった件
minorun365
PRO
1
370
AWSではじめる Web APIテスト実践ガイド / A practical guide to testing Web APIs on AWS
yokawasa
8
810
30→150人のエンジニア組織拡大に伴うアジャイル文化を醸成する役割と取り組みの変化
nagata03
0
400
大規模アジャイルフレームワークから学ぶエンジニアマネジメントの本質
staka121
PRO
3
1.8k
貧民的プログラミングのすすめ
kakehashi
PRO
2
230
Featured
See All Featured
Stop Working from a Prison Cell
hatefulcrawdad
268
20k
Measuring & Analyzing Core Web Vitals
bluesmoon
6
260
We Have a Design System, Now What?
morganepeng
51
7.4k
Facilitating Awesome Meetings
lara
53
6.3k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
6
580
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Making Projects Easy
brettharned
116
6k
Building Your Own Lightsaber
phodgson
104
6.2k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.3k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
4
390
Agile that works and the tools we love
rasmusluckow
328
21k
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!