Merge branch 'remove-var-translation'

This commit is contained in:
Devin Vinson 2015-12-11 12:58:15 -05:00
commit 923fbaf0c8
2 changed files with 2 additions and 19 deletions

View File

@ -26,14 +26,6 @@
*/
class Plugin_Name_i18n {
/**
* The domain specified for this plugin.
*
* @since 1.0.0
* @access private
* @var string $domain The domain identifier for this plugin.
*/
private $domain;
/**
* Load the plugin text domain for translation.
@ -43,21 +35,13 @@ class Plugin_Name_i18n {
public function load_plugin_textdomain() {
load_plugin_textdomain(
$this->domain,
'plugin-name',
false,
dirname( dirname( plugin_basename( __FILE__ ) ) ) . '/languages/'
);
}
/**
* Set the domain equal to that of the specified domain.
*
* @since 1.0.0
* @param string $domain The domain that represents the locale of this plugin.
*/
public function set_domain( $domain ) {
$this->domain = $domain;
}
}

View File

@ -135,7 +135,6 @@ class Plugin_Name {
private function set_locale() {
$plugin_i18n = new Plugin_Name_i18n();
$plugin_i18n->set_domain( $this->get_plugin_name() );
$this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );