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
GWTD: I18N Improvements in WordPress 4.6 And Be...
Search
Pascal Birchler
November 12, 2016
Programming
0
71
GWTD: I18N Improvements in WordPress 4.6 And Beyond
Slides for my presentation at the 2nd Global WordPress Translation Day on November 12th, 2016.
Pascal Birchler
November 12, 2016
Tweet
Share
More Decks by Pascal Birchler
See All by Pascal Birchler
Client-side media processing in WordPress
swissspidy
0
56
Democratizing Performance
swissspidy
0
74
On Multilingual WordPress Sites
swissspidy
0
56
WordPress Internationalization Workflows
swissspidy
0
3.2k
WordPress Internationalization Workflows
swissspidy
0
120
WordPress Internationalization Workflows
swissspidy
1
1.1k
On Internationalization and Localization
swissspidy
0
250
Internationalisation in the Age of Gutenberg
swissspidy
0
300
Internationalization Introduction at WordCamp Bern
swissspidy
0
110
Other Decks in Programming
See All in Programming
#kanrk08 / 公開版 PicoRubyとマイコンでの自作トレーニング計測装置を用いたワークアウトの理想と現実
bash0c7
1
650
Modern Angular with Signals and Signal Store:New Rules for Your Architecture @enterJS Advanced Angular Day 2025
manfredsteyer
PRO
0
160
WebViewの現在地 - SwiftUI時代のWebKit - / The Current State Of WebView
marcy731
0
100
PHPで始める振る舞い駆動開発(Behaviour-Driven Development)
ohmori_yusuke
2
230
Flutterで備える!Accessibility Nutrition Labels完全ガイド
yuukiw00w
0
130
XP, Testing and ninja testing
m_seki
3
220
すべてのコンテキストを、 ユーザー価値に変える
applism118
2
990
datadog dash 2025 LLM observability for reliability and stability
ivry_presentationmaterials
0
330
GitHub Copilot and GitHub Codespaces Hands-on
ymd65536
1
130
データの民主化を支える、透明性のあるデータ利活用への挑戦 2025-06-25 Database Engineering Meetup#7
y_ken
0
330
都市をデータで見るってこういうこと PLATEAU属性情報入門
nokonoko1203
1
580
Is Xcode slowly dying out in 2025?
uetyo
1
240
Featured
See All Featured
How GitHub (no longer) Works
holman
314
140k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.3k
Balancing Empowerment & Direction
lara
1
390
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
5
230
A Tale of Four Properties
chriscoyier
160
23k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
357
30k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
30
2.1k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.4k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Speed Design
sergeychernyshev
32
1k
BBQ
matthewcrist
89
9.7k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
Transcript
Internationalization Improvements in WordPress 4.6 and Beyond
Pascal Birchler @swissspidy
First, Some History
Language Packs
Automatic Updates
Language Chooser
None
Change Your Mind
None
Language Packs for Plugins and Themes
WordPress 4.6
Localized Datepicker
None
Bonus: wp_add_inline_script()
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/…
On Demand Translations™
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
Demo
Good bye, load_plugin_textdomain()
WordPress 4.7
User Admin Language
None
None
Back End: Español 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
Demo
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
None
Good bye, wp_localize_script()
User Timezones
None
Open Floor
Thanks!