<?php

/**
 * Define the internationalization functionality
 *
 * Loads and defines the internationalization files for this plugin
 * so that it is ready for translation.
 *
 * @link       http://yemlihakorkmaz.com
 * @since      1.0.0
 *
 * @package    Korkmaz_contract
 * @subpackage Korkmaz_contract/includes
 */



class Korkmaz_contract_i18n
{


	/**
	 * Load the plugin text domain for translation.
	 *
	 * @since    1.0.0
	 */
	public function load_plugin_korkmaz_contract()
	{
		$domain = 'wc-korkmaz-contract';
		$locale = function_exists( 'determine_locale' ) ? determine_locale() : get_locale();
		$mofile = plugin_dir_path( dirname( __FILE__ ) ) . 'languages/' . $domain . '-' . $locale . '.mo';

		if ( file_exists( $mofile ) ) {
			if ( is_textdomain_loaded( $domain ) ) {
				unload_textdomain( $domain );

				global $l10n_unloaded;

				if ( is_array( $l10n_unloaded ) && isset( $l10n_unloaded[ $domain ] ) ) {
					unset( $l10n_unloaded[ $domain ] );
				}
			}

			load_textdomain( $domain, $mofile );
		}

		load_plugin_textdomain(
			$domain,
			false,
			dirname(dirname(plugin_basename(__FILE__))) . '/languages/'
		);
	}
}
