Wordpress plugin: add support for <html lang=""> #230
Replies: 1 comment 3 replies
-
Thank you very much for your suggestion. That's right, mosparo uses the device locale for maximum accessibility. The idea is that the user can understand the checkbox as well as possible, even if the website is not in the user's language. However, I understand that in some cases, the different languages on the same page do not look good. Because of this, it's possible to define the language in the JavaScript code included in your website (https://documentation.mosparo.io/docs/integration/custom#additional-options, see To use this option with WordPress, you must use a filter to set the language. You can use the filter Something like this should work: function mosparoOverrideOptions($options)
{
$options['language'] = 'fi_FI'; // Specify the language you want
return $options;
}
add_filter('mosparo_integration_filter_frontend_options', 'mosparoOverrideOptions'); Users will now see the mosparo box in the locale With that option in mind, do you still think the mosparo WordPress plugin should be able to use the language in the Kind regards, zepich |
Beta Was this translation helpful? Give feedback.
-
Currently it seems that Mosparo detects language from device locale. This won't always get best results because people use different language on their devices and the site where Mosparo is used might be in another one. Adding an option to Mosparo Wordpress settings that Mosparo would prefer html lang tag first and if there's none, use device language. This might be usable on wider range too...
Beta Was this translation helpful? Give feedback.
All reactions