Title: Multi language support
Last modified: April 26, 2024

---

# Multi language support

 *  [Astral Internet](https://wordpress.org/support/users/astralinternet/)
 * (@astralinternet)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/multi-language-support-41/)
 * Hi,
 * Is there any plan on have a multi lingual support with the extension ?
 * Maybe this could be possiible by finding a way to insert a small JS snippet updating
   the “customMessages” value of the mosparo JS object ([https://documentation.mosparo.io/docs/integration/custom/](https://documentation.mosparo.io/docs/integration/custom/)).

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [mosparo](https://wordpress.org/support/users/mosparo/)
 * (@mosparo)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/multi-language-support-41/#post-17716732)
 * Hi [@astralinternet](https://wordpress.org/support/users/astralinternet/)
 * Thank you very much for your question.
 * The plugin and mosparo are, in general, multilingual. The frontend translations
   of mosparo are available in multiple languages. You can find the complete list
   here: [https://github.com/mosparo/mosparo/blob/master/translations/README.md](https://github.com/mosparo/mosparo/blob/master/translations/README.md)
 * When initializing mosparo, mosparo chooses the translations based on your browser’s
   locale.
 * But there’s also a WordPress filter that allows you to adjust the settings for
   the frontend box. With that, you can set the language of the mosparo box independently
   from your browser’s locale (as long as the translation is in mosparo included),
   or you can even set your translations (`customMessages`). You can find an example
   here: [https://github.com/mosparo/wordpress-plugin/issues/7#issuecomment-2014640026](https://github.com/mosparo/wordpress-plugin/issues/7#issuecomment-2014640026)
 * Or do you need something else adjustable or translatable?
 * Kind regards,
 * zepich / mosparo Team
 *  Thread Starter [Astral Internet](https://wordpress.org/support/users/astralinternet/)
 * (@astralinternet)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/multi-language-support-41/#post-17758444)
 * Thank you for this information, the hook work great.
 * Wouln’d it be a good idea to add a hook for most multi languge extension (at 
   least until Gutenberg natively support it (finger crossed!)). A simple addition
   to the code could do the trick :
 *     ```wp-block-code
       // Set Captcha language
       function mosparoOverrideMessages($options)
       {
           // Match WPML language if available
           if (has_action('wpml_current_language')) {
               $options['language'] = apply_filters( 'wpml_current_language', NULL );
   
           // Match Polylang language if available
           } elseif(function_exists(pll_current_language)) {
              $options['language'] = pll_current_language(); 
           }
   
           return $options;
       }
       add_filter('mosparo_integration_filter_frontend_options', 'mosparoOverrideMessages');
       ```
   
 *  Plugin Author [mosparo](https://wordpress.org/support/users/mosparo/)
 * (@mosparo)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/multi-language-support-41/#post-17771256)
 * Hi [@astralinternet](https://wordpress.org/support/users/astralinternet/) 
 * Thank you very much for your suggestion!
 * A user on GitHub, Sapper-Morton, suggested a very similar idea: offering an option
   to determine the language using the HTML `lang` attribute. The problem with such
   a solution is that we must implement it in every plugin and integration.
 * It’s the same with your suggestion. Of course, it’s possible, but it can be complicated
   based on the number of multilanguage plugins. Additionally, we should do it for
   all our plugins and integrations.
 * But, based on the suggestion from Sapper-Morton, we had an idea to implement 
   the HTML `lang` directly in the mosparo logic. We suggest always sending the 
   HTML `lang` attribute to the mosparo API and adding an option in mosparo with
   which the project owner can choose between the source of the language (Browser
   or HTML tag `lang`). You can read the whole idea here: [https://github.com/orgs/mosparo/discussions/230#discussioncomment-9441541](https://github.com/orgs/mosparo/discussions/230#discussioncomment-9441541)
 * With this solution, we can add this more flexible option very easily and for 
   all integrations simultaneously.
 * Please let us know what you think about this solution.
 * Kind regards,
 * zepich / mosparo Team

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Multi language support’ is closed to new replies.

 * ![](https://ps.w.org/mosparo-integration/assets/icon-256x256.png?rev=2799617)
 * [mosparo Integration](https://wordpress.org/plugins/mosparo-integration/)
 * [Support Threads](https://wordpress.org/support/plugin/mosparo-integration/)
 * [Active Topics](https://wordpress.org/support/plugin/mosparo-integration/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/mosparo-integration/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/mosparo-integration/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [mosparo](https://wordpress.org/support/users/mosparo/)
 * Last activity: [2 years, 2 months ago](https://wordpress.org/support/topic/multi-language-support-41/#post-17771256)
 * Status: not a support question