Skip to content

Commit 38a27c2

Browse files
authored
chore(clerk-js): Add comment for Turnstile locale (#5464)
1 parent db4b5fe commit 38a27c2

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

.changeset/quick-things-heal.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

packages/clerk-js/src/ui/elements/CaptchaElement.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ export const CaptchaElement = () => {
1818
const { locale } = useLocalizations();
1919
const captchaTheme = parsedCaptcha?.theme;
2020
const captchaSize = parsedCaptcha?.size;
21+
// Turnstile expects the language to be lowercase, so we convert it here (e.g. 'en-US' -> 'en-us')
22+
// Supported languages: https://developers.cloudflare.com/turnstile/reference/supported-languages
2123
const captchaLanguage = parsedCaptcha?.language || locale?.toLowerCase();
2224

2325
useEffect(() => {

0 commit comments

Comments
 (0)