From a0510c4539cacc3bb7a812a3068ff3c33b8bd953 Mon Sep 17 00:00:00 2001 From: yuskhan Date: Tue, 10 Sep 2024 10:40:07 -0400 Subject: [PATCH] chore: add language options --- projects/ngx-turnstile/src/lib/interfaces/turnstile-options.ts | 1 + projects/ngx-turnstile/src/lib/ngx-turnstile.component.ts | 2 ++ 2 files changed, 3 insertions(+) diff --git a/projects/ngx-turnstile/src/lib/interfaces/turnstile-options.ts b/projects/ngx-turnstile/src/lib/interfaces/turnstile-options.ts index fcb454e..f20e296 100644 --- a/projects/ngx-turnstile/src/lib/interfaces/turnstile-options.ts +++ b/projects/ngx-turnstile/src/lib/interfaces/turnstile-options.ts @@ -6,6 +6,7 @@ export interface TurnstileOptions { 'error-callback'?: (errorCode: string) => boolean; 'expired-callback'?: () => void; theme?: 'light' | 'dark' | 'auto'; + language?: string; tabindex?: number; appearance?: 'always' | 'execute' | 'interaction-only'; } diff --git a/projects/ngx-turnstile/src/lib/ngx-turnstile.component.ts b/projects/ngx-turnstile/src/lib/ngx-turnstile.component.ts index 3cc5b0c..871579a 100644 --- a/projects/ngx-turnstile/src/lib/ngx-turnstile.component.ts +++ b/projects/ngx-turnstile/src/lib/ngx-turnstile.component.ts @@ -40,6 +40,7 @@ export class NgxTurnstileComponent implements AfterViewInit, OnDestroy { @Input() action?: string; @Input() cData?: string; @Input() theme?: 'light' | 'dark' | 'auto' = 'auto'; + @Input() language?: string = 'auto'; @Input() version: SupportedVersion = '0'; @Input() tabIndex?: number; @Input() appearance?: 'always' | 'execute' | 'interaction-only' = 'always'; @@ -66,6 +67,7 @@ export class NgxTurnstileComponent implements AfterViewInit, OnDestroy { let turnstileOptions: TurnstileOptions = { sitekey: this.siteKey, theme: this.theme, + language: this.language, tabindex: this.tabIndex, action: this.action, cData: this.cData,