This repository has been archived on 2023-08-16. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
footnotes/src/includes/class-i18n.php

44 lines
1.2 KiB
PHP
Raw Normal View History

2021-05-01 21:38:11 +01:00
<?php // phpcs:disable PEAR.NamingConventions.ValidClassName.StartWithCapital
/**
2021-05-01 21:34:46 +01:00
* File providing core `i18n` class.
*
2021-05-01 21:34:46 +01:00
* @package footnotes
* @since 1.5.0
* @since 2.8.0 Rename file from `language.php` to `class-footnotes-i18n.php`,
2021-05-01 19:22:41 +01:00
* rename `class/` sub-directory to `includes/`.
*/
2021-05-01 21:34:46 +01:00
namespace footnotes\includes;
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-config.php';
/**
2021-04-29 20:57:30 +01:00
* Class providing internationalization functionality.
*
2021-05-01 19:22:41 +01:00
* Loads and defines the internationalization files for this plugin so that it
2021-04-29 20:57:30 +01:00
* is ready for translation.
*
2021-05-01 21:34:46 +01:00
* @link https://translate.wordpress.org/projects/wp-plugins/footnotes/ GlotPress listing
*
2021-05-01 21:34:46 +01:00
* @package footnotes
* @since 1.5.0
* @since 2.8.0 Rename class from `Language` to `i18n`.
*/
2021-05-01 21:34:46 +01:00
class i18n {
/**
* Load the plugin text domain for translation.
*
2021-04-29 20:57:30 +01:00
* @since 1.5.1
* @since 2.8.0 Rename from `load()` to `load_plugin_textdomain()`. Remove unused `$p_str_language_code` parameter.
*/
public function load_plugin_textdomain() {
load_plugin_textdomain(
'footnotes',
false,
dirname( dirname( plugin_basename( __FILE__ ) ) ) . '/languages/'
);
}
}