Permalink
Browse files

Load textdomain.

  • Loading branch information...
1 parent 2b7d76b commit 61abd92057d533b288e596b002a298058088f7b0 @mfields committed Jun 3, 2011
Showing with 12 additions and 2 deletions.
  1. +12 −2 mfields-plus-one.php
View
@@ -14,7 +14,6 @@
/**
* Mfields Plus One
*
- * @todo Load text domain.
* @todo Readme file.
* @todo Docs.
* @todo Release.
@@ -35,6 +34,7 @@ class Mfields_Plus_One {
*/
static function init() {
register_activation_hook( __FILE__, array( __class__, 'activate' ) );
+ add_action( 'init', array( __class__, 'load_textdomain' ) );
add_action( 'init', array( __class__, 'register_enqueueables' ) );
add_action( 'admin_menu', array( __class__, 'settings_menu' ), 10 );
add_action( 'admin_menu', array( __class__, 'settings_enqueue' ), 11 );
@@ -50,7 +50,7 @@ static function init() {
* An entry in the options table will created when this plugin
* is activated in the event that it does not already exist.
*
- * @since 2011-06-02
+ * @since 2011-06-03
* @access private
*/
function activate() {
@@ -60,6 +60,16 @@ function activate() {
}
/**
+ * Load Text Domain.
+ *
+ * @since 2011-06-03
+ * @access private
+ */
+ function load_textdomain() {
+ load_plugin_textdomain( 'mfields_plus_one', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
+ }
+
+ /**
* Register Scripts and Styles.
*
* @since 2011-06-02

0 comments on commit 61abd92

Please sign in to comment.