Title: Set language via shortcode param
Last modified: January 24, 2022

---

# Set language via shortcode param

 *  Resolved [net](https://wordpress.org/support/users/krstarica/)
 * (@krstarica)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/set-language-via-shortcode-param/)
 * It would be nice to be able to override language detection using [hcaptcha] shortcode
   parameter, to able to present captcha in appropriate language on multiple language
   pages.

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

 *  [danielgc](https://wordpress.org/support/users/danielgc/)
 * (@danielgc)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/set-language-via-shortcode-param/#post-15300204)
 * Yes, plz, this would be great
 *  Plugin Contributor [kaggdesign](https://wordpress.org/support/users/kaggdesign/)
 * (@kaggdesign)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/set-language-via-shortcode-param/#post-15360193)
 * Thank you for the idea.
 * Unfortunately, we cannot set language via shortcode parameter, as the language
   is specified in the hCaptcha script only. There could be several shortcodes (
   and several hCaptcha widgets, therefore) on a page, but only one script.
 * So, we can change the language for all hCaptcha widgets on the page. To make 
   it programmatically, I have added the hook to the plugin. You can use the following
   filter:
 *     ```
       /**
        * Filters hCaptcha language.
        *
        * @param string $language Language.
        */
       function my_hcap_language( $language ) {
       	// Detect page language and return it.
       	$page_language = 'some lang'; // Detection depends on the multilingual plugin used.
   
       	return $page_language;
       }
   
       add_filter( 'hcap_language', 'my_hcap_language' );
       ```
   
 * This hook is implemented in v1.14.0 of the plugin, which we plan to release today
   or tomorrow.

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

The topic ‘Set language via shortcode param’ is closed to new replies.

 * ![](https://ps.w.org/hcaptcha-for-forms-and-more/assets/icon.svg?rev=3026321)
 * [hCaptcha for WP](https://wordpress.org/plugins/hcaptcha-for-forms-and-more/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/hcaptcha-for-forms-and-more/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/hcaptcha-for-forms-and-more/)
 * [Active Topics](https://wordpress.org/support/plugin/hcaptcha-for-forms-and-more/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/hcaptcha-for-forms-and-more/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/hcaptcha-for-forms-and-more/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [kaggdesign](https://wordpress.org/support/users/kaggdesign/)
 * Last activity: [4 years, 3 months ago](https://wordpress.org/support/topic/set-language-via-shortcode-param/#post-15360193)
 * Status: resolved