Documentation Localizing & Translating Themes

Localizing & Translating Themes

Overview #

For localizing and translating themes, you can use the built-in i18n features available in WordPress.

Below, we’ve outlined a few things to keep in mind.

↑ Top ↑

Using the correct locale #

language files need to be in the format of,, and not or

$textdomain = true === WPCOM_IS_VIP_ENV ? 'default' : 'vip';

if( file_exists( $mofile ) )
         load_theme_textdomain( $textdomain, $mofile );

// __( 'My translatable string', 'vip' );

↑ Top ↑

Translation conflicts #

If the translations in your theme conflict with existing translations on, you have two options:

  • If your translation is better/more accurate, you can submit it via our GlotPress instance
  • Use the _x and friends (_ex, _nx, etc.) with an added context so that translations in your theme are given priority over others.