| 1 |
<?php |
| 2 |
// Guard: block direct web access — only load when WordPress is bootstrapped. |
| 3 |
if ( ! defined( 'ABSPATH' ) ) { |
| 4 |
exit; // Exit if accessed directly |
| 5 |
} |
| 6 |
|
| 7 |
/** |
| 8 |
* Define the internationalization functionality |
| 9 |
* |
| 10 |
* File role: loads the plugin's translation (.mo) files from the /languages/ directory. |
| 11 |
* The load_plugin_textdomain() method is hooked to 'plugins_loaded' via the Loader so the |
| 12 |
* 'mlsimport' text domain is available before admin/public strings are translated. |
| 13 |
* |
| 14 |
* Loads and defines the internationalization files for this plugin |
| 15 |
* so that it is ready for translation. |
| 16 |
* |
| 17 |
* @link http://mlsimport.com/ |
| 18 |
* @since 1.0.0 |
| 19 |
* |
| 20 |
* @package Mlsimport |
| 21 |
* @subpackage Mlsimport/includes |
| 22 |
*/ |
| 23 |
|
| 24 |
/** |
| 25 |
* Define the internationalization functionality. |
| 26 |
* |
| 27 |
* Loads and defines the internationalization files for this plugin |
| 28 |
* so that it is ready for translation. |
| 29 |
* |
| 30 |
* @since 1.0.0 |
| 31 |
* @package Mlsimport |
| 32 |
* @subpackage Mlsimport/includes |
| 33 |
* @author MlsImport <office@mlsimport.com> |
| 34 |
*/ |
| 35 |
class Mlsimport_i18n { |
| 36 |
|
| 37 |
|
| 38 |
/** |
| 39 |
* Load the plugin text domain for translation. |
| 40 |
* |
| 41 |
* Registers the 'mlsimport' text domain, pointing WordPress at the plugin's |
| 42 |
* /languages/ directory so .mo files there are used for translated strings. |
| 43 |
* |
| 44 |
* @since 1.0.0 |
| 45 |
* @return void |
| 46 |
*/ |
| 47 |
public function load_plugin_textdomain() { |
| 48 |
|
| 49 |
// Register the text domain; path is derived from this file: includes/ -> plugin root -> /languages/. |
| 50 |
load_plugin_textdomain( |
| 51 |
'mlsimport', |
| 52 |
false, |
| 53 |
dirname( dirname( plugin_basename( __FILE__ ) ) ) . '/languages/' |
| 54 |
); |
| 55 |
} |
| 56 |
} |
| 57 |
|