WordPress.com VIP platform specific
This document is for sites running on WordPress.com VIP.
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.
Using the correct locale #
language files need to be in the format of es.mo, fr.mo, and not es_ES.mo or fr_CA.mo
$textdomain = true === WPCOM_IS_VIP_ENV ? 'default' : 'vip'; if( file_exists( $mofile ) ) load_theme_textdomain( $textdomain, $mofile ); // __( 'My translatable string', 'vip' );
Translation conflicts #
If the translations in your theme conflict with existing translations on WordPress.com, you have two options: