From 0f2ae426521cd57bf28defcd46a11885cf179ce4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yi=C4=9Fit=20FINDIKLI?= Date: Thu, 11 Mar 2021 11:47:55 +0300 Subject: [PATCH] Fixed #9985 - Changing captcha language does not work --- src/app/components/captcha/captcha.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/app/components/captcha/captcha.ts b/src/app/components/captcha/captcha.ts index bb4258fba84..5705f95cc62 100755 --- a/src/app/components/captcha/captcha.ts +++ b/src/app/components/captcha/captcha.ts @@ -18,8 +18,6 @@ export class Captcha implements AfterViewInit,OnDestroy { @Input() size = 'normal'; @Input() tabindex = 0; - - @Input() language: string = null; @Input() initCallback = "initRecaptcha"; @@ -29,6 +27,18 @@ export class Captcha implements AfterViewInit,OnDestroy { private _instance: any = null; + private _language: any = null; + + + @Input() get language(): string { + return this._language; + } + + set language(language: string) { + this._language = language; + this.init(); + } + constructor(public el: ElementRef, public _zone: NgZone, public cd: ChangeDetectorRef) {} ngAfterViewInit() {