All Products
Search
Document Center

Captcha:Configure custom text and multi-language settings

Last Updated:Jul 05, 2025

Captcha 2.0 supports 17 languages. You can configure custom text and multi-language settings for CAPTCHAs based on your business requirements when you integrate Captcha 2.0 into a business client.

Supported languages

Note

The following list describes the supported languages. You can specify the languages that you need by using the language parameter.

  • cn: simplified Chinese

  • tw: traditional Chinese

  • en: English

  • ar: Arabic

  • de: German

  • es: Spanish

  • fr: French

  • in: Indonesian

  • it: Italian

  • ja: Japanese

  • ko: Korean

  • pt: Portuguese

  • ru: Russian

  • ms: Malaysia

  • th: Thai

  • tr: Turkish

  • vi: Vietnamese

Important

If you set the language parameter to cn, tw, en, ja, or ko, the spatial reasoning CAPTCHAs for the specified language are used. If you set the language parameter to a value other than these five values, the spatial reasoning CAPTCHAs for Chinese are used by default.

The spatial reasoning CAPTCHA type will be unpublished soon. For more information, see [Announcement] Notice of spatial reasoning CAPTCHA type unpublishing.

Sample code

The following sample code shows how to configure custom text in various languages for CAPTCHAs:

Note

Captcha 2.0 allows you to specify custom text in 13 components of CAPTCHAs. To achieve this, you can define a myLang object that stores the custom text for the components and pass the myLang object as a parameter.

/**
 * Specify cn, tw, or en as the language of the custom text. You can also specify other languages. 
 * Specify the custom text in key-value pairs. 
 */
var myLang = {
  cn: {
    // Text for the embedded trigger button in V3 architecture.
    START_VERIFY: "Click to start verification",
    // Title text for CAPTCHA prompts, common to all verification types.
    POPUP_TITLE: "Complete Security Verification",
    // Interaction prompt text for different verification types.
    SLIDE_TIP: "Drag the slider all the way to the right",
    CHECK_BOX_TIP: "Confirm you are not a robot",
    PUZZLE_TIP: "Drag the slider to complete the puzzle",
    INPAINTING_TIP: "Drag the slider to restore the complete image",
    // Process prompt text for verification requests, applicable to slider verification and one-click verification.
    VERIFYING: "Verifying...",
    // Prompt text for successful verification, common to all verification types.
    SUCCESS: "Verification successful!",
    // Prompt text for failed verification, applicable to slider verification and one-click verification.
    SLIDE_FAIL: "Verification failed, please refresh and try again",
    // Prompt text for failed verification, applicable to puzzle verification and image restoration.
    CAPTCHA_FAIL: "Verification failed, please try again!",
    // Prompt text for network abnormalities.
    CONGESTION: "Traffic congestion, please refresh and try again",
    // Prompt text for completed interaction before submitting verification. Specific to V2 architecture-embedded, currently triggered by business buttons.
    CAPTCHA_COMPLETED: "Sliding completed",
    // Prompt text for submitting verification without completing any interaction. Specific to V2 architecture-embedded, currently triggered by business buttons.
    FINISH_CAPTCHA: "Please complete verification first!",
  },
  en: {
    // The same text keys.
    POPUP_TITLE: "Please complete captcha",
    // ...
  },
};

initAliyunCaptcha({
  ...
  upLang: "",
  language:"cn", // The language of CAPTCHAs, such as cn.
  ...
});
Important
  1. If you require languages that are not supported by Captcha 2.0, you can set the language parameter of the initAliyunCaptcha function to the required language, prepare custom text in that language, and then specify the custom text as the values of the text keys in the myLang object. Example: language: 'xx', "xx": { "POPUP_TITLE": "Custom text in the xx language"}.

  2. If you specify a language that is not supported by Captcha 2.0, the system returns the default text in Chinese by default. If you specify a language that is supported by Captcha 2.0, the system returns the default text in that language.

  3. Customization is not supported for the following system text: You stay on the page for a long period of time. Refresh and try again later.

Positions of text

The following table describes how the custom text stored in the myLang object is displayed in the components of CAPTCHAs, such as the display of the text that prompts a user to complete security verification, the text that appears if a CAPTCHA is loading, and the text that appears if the verification fails.

key

Default value

Slider verification - Sample image

One-click verification - Sample image

Puzzle verification - Sample image

Image restoration - Sample image

Remarks

START_VERIFY

"Click to start verification"

/

/

image

image

Text for the embedded trigger button in V3 architecture.

POPUP_TITLE

"Please complete security verification"

image

image

image

image

Title text for CAPTCHA prompts, common to all verification types.

  • SLIDE_TIP

  • CHECK_BOX_TIP

  • PUZZLE_TIP

  • INPAINTING_TIP

  • "Drag the slider all the way to the right"

  • "Confirm you are not a robot"

  • "Drag the slider to complete the puzzle"

  • "Drag the slider to restore the complete image"

image

image

image

image

Interaction prompt text for different verification types.

VERIFYING

"Verifying..."

image

image

/

/

Process prompt text for verification requests, applicable to slider verification and one-click verification.

SUCCESS

"Verification successful"

image

image

image

image

Prompt text for successful verification, common to all verification types.

SLIDE_FAIL

"Verification failed, please refresh and try again"

image

image

/

/

Prompt text for failed verification, applicable to slider verification and one-click verification.

CAPTCHA_FAIL

"Verification failed, please try again!"

/

/

image

image

Prompt text for failed verification, applicable to puzzle verification and image restoration.

CONGESTION

"Traffic congestion, please refresh and try again"

image

image

image

image

Prompt text for network abnormalities.

CAPTCHA_COMPLETED

"Sliding completed"

image

/

image

image

Prompt text for completed interaction before submitting verification. Specific to V2 architecture-embedded, currently triggered by business buttons.

Note
  • The interaction experience is suboptimal. We recommend integrating the embedded interaction UI of V3 architecture.

  • If you want to submit verification immediately after sliding is completed, set the immediate parameter to true in the V2 architecture initialization.

FINISH_CAPTCHA

"Please complete verification first!"

image

image

image

image

Prompt text for submitting verification without completing any interaction. Specific to V2 architecture-embedded, currently triggered by business buttons.

Note

Changing the prompt position is not currently supported. We recommend integrating the embedded interaction UI of V3 architecture.

/

  • "Verification timeout, please close the CAPTCHA and try again"

  • "Verification timeout, please click on the CAPTCHA frame and try again"

image.png

image.png

image.png

image.png

image.png

image.png

image.png

image.png

Modification not supported