Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Recent I18N Improvements in WordPress Core

Recent I18N Improvements in WordPress Core

Caching, timezones and internationalisation are just a few things that make developers cringe. In this lightning talk at WordCamp London 2017 I highlight some recent enhancement in the field of I18N in WordPress to show how we’ve got you covered. I also gave a glimpse at what may come in the future.

Pascal Birchler

March 19, 2017
Tweet

More Decks by Pascal Birchler

Other Decks in Technology

Transcript

  1. $switched = switch_to_locale( get_user_locale() ) // Do stuff. if (

    $switched ) { restore_previous_locale(); }
  2. // PHP: wp_localize_script( 'myplugin-script', '_myPluginL10n', array( 'helloWorld' => __( 'Hello

    World','myplugin' ) ) ); // JS: alert( _myPluginL10n.helloWorld );