<?php
namespace Svea_Webpay_For_Woocommerce;

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

/**
 * Class that handles languages
 */
class I18n {

	/**
	 * Initialize the class
	 *
	 * @return void
	 */
	public function init() {
		add_action( 'init', [ $this, 'load_textdomain' ] );
	}

	/**
	 * Load the textdomain
	 *
	 * @return void
	 */
	public function load_textdomain() {
		load_plugin_textdomain( Plugin::PLUGIN_SLUG, false, dirname( plugin_basename( WC_SVEAWEBPAY_GATEWAY_PLUGIN_DIR ) ) . '/languages' );
	}
}
