# survey-maker/5.2.2.5/includes/class-survey-maker-i18n.php

Survey Maker by AYS, version 5.2.2.5. 78 lines.

- Page: https://pluginprobe.com/plugins/survey-maker/5.2.2.5/code/includes/class-survey-maker-i18n.php
- Raw: https://pluginprobe.com/plugins/survey-maker/5.2.2.5/raw/includes/class-survey-maker-i18n.php
- Modified: 2026-05-19T12:03:26+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/survey-maker/5.2.2.5/code/includes/class-survey-maker-i18n.php#L10-L20`.

```php
<?php

/**
 * Define the internationalization functionality
 *
 * Loads and defines the internationalization files for this plugin
 * so that it is ready for translation.
 *
 * @link       https://ays-pro.com/
 * @since      1.0.0
 *
 * @package    Survey_Maker
 * @subpackage Survey_Maker/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    Survey_Maker
 * @subpackage Survey_Maker/includes
 * @author     Survey Maker team <info@ays-pro.com>
 */
class Survey_Maker_i18n {


	/**
	 * Load the plugin text domain for translation.
	 *
	 * @since    1.0.0
	 */
	public function load_plugin_textdomain() {

		// load_plugin_textdomain(
		// 	'survey-maker',
		// 	false,
		// 	dirname( dirname( plugin_basename( __FILE__ ) ) ) . '/languages/'
		// );

		if ( version_compare( get_bloginfo( 'version' ), '6.7', '>=' ) ) {
            $plugin = 'survey-maker';
            if( is_admin() ){
                $locale = get_user_locale();
            } else {
                $locale = get_locale();
            }


            if ( is_textdomain_loaded( $plugin ) ) {
                unload_textdomain( $plugin );
            }
            $mofile = sprintf( '%s-%s.mo', $plugin, $locale );
            // check the plugin language folder.
            $domain_path = path_join( WP_PLUGIN_DIR, "{$plugin}/languages" );
            $loaded = load_textdomain( $plugin, path_join( $domain_path, $mofile ) );

            if ( ! $loaded ) { //else, check the installation language path first.
                $domain_path = path_join( WP_LANG_DIR, 'plugins' );
                load_textdomain( $plugin, path_join( $domain_path, $mofile ) );
            }
        } else {
            load_plugin_textdomain(
				'survey-maker',
				false,
				dirname( dirname( plugin_basename( __FILE__ ) ) ) . '/languages/'
			);
        }


	}



}

```
