mTouch Quiz
[resolved] Change language (5 posts)

  1. Mixx
    Posted 4 years ago #

    I see the .po and .mo files for the dutch translation are already there, but how do i actually change the language of the plugin?


  2. Stef Verbeeck
    Posted 3 years ago #

    Hi there,

    Did you ever manage to change the language? I have the exact same question.

  3. borissamardzija
    Posted 3 years ago #

    Hi, I was also searching for this and had to dig a bit.

    This is the part of code that does it

    /// Initialize this plugin. Called by 'init' hook.
    add_action('init', 'mtq_init');
    function mtq_init() {
    	load_plugin_textdomain('mtouchquiz', 'wp-content/plugins/mtouch-quiz/lang/' );
    	add_action('admin_menu', 'mtq_menu');
    	$installed_db = get_option('mtouchquiz_db_version');
    	if ( $installed_db != mtq_database_version ) {

    As you can see, it calls

    The locale is the language code and/or country code you defined in the constant WPLANG in the file wp-config.php.

  4. robbiegod
    Posted 3 years ago #

    We use the WPML plugin and we made two quizzes. One for English and one for Spanish. I noticed when looking in the mTouch Quiz plugin lang folder that some of the files are not named correctly.

    For example, the "mtouchquiz-es.mo" and "mtouchquiz-es.po" files are not correctly named. Both of these files should be "mtouchquiz-es_ES.mo" and "mtouchquiz-es_ES.po".

    Renaming the files immediately displayed the spanish text, so that was the missing link with out problem.

    I would double check that your language files are named correctly.

  5. gmichaelguy
    Plugin Author

    Posted 3 years ago #

    The plugin will automatically load the language file that corresponds to the language you have wordpress set. So if you set the language to es_ES then you won't have to do this. I will look at the naming issues and fix any that are incorrect. Note that I get these files from kind volunteers and I don't really check their work and assume they did it correctly.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • mTouch Quiz
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.