mirror of
https://github.com/inretio/WordPress-Plugin-Boilerplate
synced 2024-12-22 03:43:54 +02:00
0c099e4208
This should fix the incorrect pattern of using a variable where we should be using the plugin-name instead. Same goes for any translatable strings within the plugin (no more using $this->plugin-name etc).
47 lines
893 B
PHP
47 lines
893 B
PHP
<?php
|
|
|
|
/**
|
|
* Define the internationalization functionality
|
|
*
|
|
* Loads and defines the internationalization files for this plugin
|
|
* so that it is ready for translation.
|
|
*
|
|
* @link http://example.com
|
|
* @since 1.0.0
|
|
*
|
|
* @package Plugin_Name
|
|
* @subpackage Plugin_Name/includes
|
|
*/
|
|
|
|
/**
|
|
* Define the internationalization functionality.
|
|
*
|
|
* Loads and defines the internationalization files for this plugin
|
|
* so that it is ready for translation.
|
|
*
|
|
* @since 1.0.0
|
|
* @package Plugin_Name
|
|
* @subpackage Plugin_Name/includes
|
|
* @author Your Name <email@example.com>
|
|
*/
|
|
class Plugin_Name_i18n {
|
|
|
|
|
|
/**
|
|
* Load the plugin text domain for translation.
|
|
*
|
|
* @since 1.0.0
|
|
*/
|
|
public function load_plugin_textdomain() {
|
|
|
|
load_plugin_textdomain(
|
|
'plugin-name',
|
|
false,
|
|
dirname( dirname( plugin_basename( __FILE__ ) ) ) . '/languages/'
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|