<?php

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

/**
 * Define the internationalization functionality.
 *
 * Loads and defines the internationalization files for this plugin
 * so that it is ready for translation.
 *
 * @since      1.0.0
 * @package    Vedrixa_Forms
 * @subpackage Vedrixa_Forms/includes
 * @author     Vedrixa <support@registrationformbuilder.com>
 */
class Registration_Form_Builder_I18n {


	/**
	 * Load the plugin text domain for translation.
	 *
	 * @since    1.0.0
	 */
	public function load_plugin_textdomain() {
		$domain = 'vedrixa-forms-registration-builder';
		if ( is_textdomain_loaded( $domain ) ) {
			return;
		}

		$locale = function_exists( 'determine_locale' ) ? determine_locale() : get_locale();
		$mofile = WP_LANG_DIR . '/plugins/' . $domain . '-' . $locale . '.mo';

		if ( file_exists( $mofile ) ) {
			load_textdomain( $domain, $mofile );
			return;
		}

		$plugin_mofile = dirname( __DIR__ ) . '/languages/' . $domain . '-' . $locale . '.mo';
		if ( file_exists( $plugin_mofile ) ) {
			load_textdomain( $domain, $plugin_mofile );
		}
	}



}
