Skip to content

Instantly share code, notes, and snippets.

@cferdinandi
Last active December 26, 2015 03:19
Show Gist options
  • Save cferdinandi/7085621 to your computer and use it in GitHub Desktop.
Save cferdinandi/7085621 to your computer and use it in GitHub Desktop.
A few simple translation functions for WordPress.
<!-- Translate -->
<?php __( '', 'kraken' ) ?>
<!-- Translate and echo -->
<?php _e( '', 'kraken' ) ?>
<!-- Translate with a variable -->
<?php printf( __( 'Thing one %s', 'kraken' ), $thing1 ); ?>
<!-- Translate with multiple variables -->
<?php printf( __( 'Thing one %1$s and thing two %2$s', 'kraken' ), $thing1, $thing2 ); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment