# sequra/4.0.0/src/Controllers/Hooks/I18n/class-i18n-controller.php

seQura, version 4.0.0. 59 lines.

- Page: https://pluginprobe.com/plugins/sequra/4.0.0/code/src/Controllers/Hooks/I18n/class-i18n-controller.php
- Raw: https://pluginprobe.com/plugins/sequra/4.0.0/raw/src/Controllers/Hooks/I18n/class-i18n-controller.php
- Modified: 2025-10-21T08:30:24+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/sequra/4.0.0/code/src/Controllers/Hooks/I18n/class-i18n-controller.php#L10-L20`.

```php
<?php
/**
 * I18n Controller
 *
 * @package    SeQura/WC
 * @subpackage SeQura/WC/Controllers
 */

namespace SeQura\WC\Controllers\Hooks\I18n;

use SeQura\WC\Controllers\Controller;
use SeQura\WC\Services\Log\Interface_Logger_Service;

/**
 * Define the internationalization functionality
 * Loads and defines the internationalization files for this plugin
 * so that it is ready for translation.
 */
class I18n_Controller extends Controller implements Interface_I18n_Controller {

	/**
	 * The relative path to translation files from wp-content/plugins
	 * 
	 * @var string
	 */
	private $domain_path;

	/**
	 * The text domain of the plugin.
	 * 
	 * @var string
	 */
	private $text_domain;

	/**
	 * Constructor
	 */
	public function __construct( 
		string $text_domain, 
		string $domain_path, 
		Interface_Logger_Service $logger,
		string $templates_path 
	) {
		parent::__construct( $logger, $templates_path );
		$this->text_domain = $text_domain;
		$this->domain_path = \trailingslashit( $domain_path );
	}

	/**
	 * Load the plugin text domain for translation.
	 * 
	 * @return void
	 */
	public function load_text_domain() {
		$this->logger->log_debug( 'Hook executed', __FUNCTION__, __CLASS__ );
		\load_plugin_textdomain( $this->text_domain, false, $this->domain_path );
	}
}

```
