<?php
/**
 * Localize Plugin.
 *
 * @package Flexible_FAQs
 */

namespace WPGO_Plugins\Flexible_Faqs;

/**
 * Localize plugin.
 */
class Localize {

	/**
	 * Common root paths/directories.
	 *
	 * @var $module_roots
	 */
	protected $module_roots;

	/**
	 * Main class constructor.
	 *
	 * @param Array $module_roots Root plugin path/dir.
	 */
	public function __construct( $module_roots ) {

		$this->module_roots = $module_roots;

		add_action( 'plugins_loaded', array( &$this, 'localize_plugin' ) );
	}

	/**
	 * Add Plugin localization support.
	 */
	public function localize_plugin() {

		load_plugin_textdomain( 'flexible-faqs', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
	}

} /* End class definition */
