2014-05-03 22:28:23 +03:00
|
|
|
<?php
|
|
|
|
|
2014-05-05 07:17:23 +03:00
|
|
|
/**
|
2014-08-19 00:00:09 +03:00
|
|
|
* Define the internationalization functionality
|
2014-07-29 23:56:18 +03:00
|
|
|
*
|
|
|
|
* Loads and defines the internationalization files for this plugin
|
|
|
|
* so that its ready for translation.
|
2014-05-05 07:17:23 +03:00
|
|
|
*
|
|
|
|
* @link http://example.com
|
|
|
|
* @since 1.0.0
|
2014-07-29 23:56:18 +03:00
|
|
|
*
|
|
|
|
* @package Plugin_Name
|
|
|
|
* @subpackage Plugin_Name/includes
|
2014-05-05 07:17:23 +03:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2014-07-29 23:56:18 +03:00
|
|
|
* Define the internationalization functionality.
|
2014-05-05 07:17:23 +03:00
|
|
|
*
|
2014-07-29 23:56:18 +03:00
|
|
|
* Loads and defines the internationalization files for this plugin
|
|
|
|
* so that its ready for translation.
|
2014-05-05 07:17:23 +03:00
|
|
|
*
|
2014-07-29 23:56:18 +03:00
|
|
|
* @since 1.0.0
|
2014-05-05 07:17:23 +03:00
|
|
|
* @package Plugin_Name
|
|
|
|
* @subpackage Plugin_Name/includes
|
|
|
|
* @author Your Name <email@example.com>
|
|
|
|
*/
|
2014-05-09 01:10:22 +03:00
|
|
|
class Plugin_Name_i18n {
|
|
|
|
|
2014-06-26 23:19:57 +03:00
|
|
|
/**
|
2014-08-19 00:00:09 +03:00
|
|
|
* The domain specified for this plugin.
|
2014-06-26 23:19:57 +03:00
|
|
|
*
|
|
|
|
* @since 1.0.0
|
|
|
|
* @access private
|
2014-08-19 00:00:09 +03:00
|
|
|
* @var string $domain The domain identifier for this plugin.
|
2014-06-26 23:19:57 +03:00
|
|
|
*/
|
2014-05-09 01:10:22 +03:00
|
|
|
private $domain;
|
2014-05-05 07:17:23 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Load the plugin text domain for translation.
|
|
|
|
*
|
|
|
|
* @since 1.0.0
|
|
|
|
*/
|
|
|
|
public function load_plugin_textdomain() {
|
|
|
|
|
2014-07-29 23:56:18 +03:00
|
|
|
load_plugin_textdomain(
|
|
|
|
$this->domain,
|
2014-09-11 07:19:37 +03:00
|
|
|
false,
|
2014-07-29 23:56:18 +03:00
|
|
|
dirname( dirname( plugin_basename( __FILE__ ) ) ) . '/languages/'
|
|
|
|
);
|
2014-05-05 07:17:23 +03:00
|
|
|
|
2014-05-09 01:10:22 +03:00
|
|
|
}
|
2014-05-05 07:17:23 +03:00
|
|
|
|
2014-05-09 06:34:29 +03:00
|
|
|
/**
|
2014-07-29 23:56:18 +03:00
|
|
|
* Set the domain equal to that of the specified domain.
|
2014-06-26 23:19:57 +03:00
|
|
|
*
|
|
|
|
* @since 1.0.0
|
2014-07-29 23:56:18 +03:00
|
|
|
* @param string $domain The domain that represents the locale of this plugin.
|
2014-05-09 06:34:29 +03:00
|
|
|
*/
|
2014-05-09 01:10:22 +03:00
|
|
|
public function set_domain( $domain ) {
|
|
|
|
$this->domain = $domain;
|
2014-05-05 07:17:23 +03:00
|
|
|
}
|
|
|
|
|
2014-05-09 01:10:22 +03:00
|
|
|
}
|