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 WordPress
Search
Pascal Birchler
November 18, 2016
Technology
0
110
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
Democratizing Performance
swissspidy
0
13
On Multilingual WordPress Sites
swissspidy
0
48
WordPress Internationalization Workflows
swissspidy
0
3.1k
WordPress Internationalization Workflows
swissspidy
0
76
WordPress Internationalization Workflows
swissspidy
1
1.1k
On Internationalization and Localization
swissspidy
0
140
Internationalisation in the Age of Gutenberg
swissspidy
0
260
Internationalization Introduction at WordCamp Bern
swissspidy
0
98
On Internationalization and Localization
swissspidy
0
100
Other Decks in Technology
See All in Technology
本気でプロダクトに向き合うCTOになるために必要な事 (技育祭2024春)
mosa_siru
33
11k
令和最新版 ソフトウェアエンジニアのためのDJ入門、あるいはDJに学ぶ仕事術 #ya8
stefafafan
1
140
最速思考でバクラク品質を! スタートアップのリアルな課題とQAの実践
nakanao
1
440
AWS IAM の結果整合性を避けるためセッションポリシーを用いてポリシーの動作確認を行う、を解説する
yukihirochiba
0
380
新卒1年目がプロジェクトを進めるときにコケたポイント
ryunakayama
1
110
自己完結な開発者組織を支える プラットフォーム作り
recruitengineers
PRO
2
230
Tohoku.Tech #1 「EC-CUBE/AWSの構築をChatGPTに相談してみました」by テンダ
jun2882
0
130
スクラムガイドに載っていないスクラムのはじめかた - チームでスクラムをはじめるときに知っておきたい5個のコツ - / How to start Scrum that is not written in the Scrum Guide
takaking22
14
5.2k
SREのキャリア、 あるいは生態 / #ya8
cohalz
10
1k
事業部を超えた 開発生産性向上に挑戦する
kentakozuka
2
190
庁舎DX推進ガイドブック
senryakuka
0
1.7k
Datadog による 自己完結的アプリケーションモニタリング
recruitengineers
PRO
3
130
Featured
See All Featured
Learning to Love Humans: Emotional Interface Design
aarron
266
39k
Into the Great Unknown - MozCon
thekraken
10
810
Happy Clients
brianwarren
91
6.3k
Testing 201, or: Great Expectations
jmmastey
27
6.3k
Gamification - CAS2011
davidbonilla
76
4.5k
Statistics for Hackers
jakevdp
789
220k
Building Applications with DynamoDB
mza
88
5.5k
The Power of CSS Pseudo Elements
geoffreycrofte
58
4.9k
How To Stay Up To Date on Web Technology
chriscoyier
781
250k
[RailsConf 2023] Rails as a piece of cake
palkan
21
3.8k
The Language of Interfaces
destraynor
150
22k
Facilitating Awesome Meetings
lara
39
5.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!