laravel-google-captcha icon indicating copy to clipboard operation
laravel-google-captcha copied to clipboard

Change language of captcha wrong ?

Open ducvu91 opened this issue 6 years ago • 5 comments

Hi, I used your plugin, it perfect but when i change language, it sometime still wrong. i config my language by vi, in both file config/captcha.php and change option in display lang => vi but sometime it still english. Can you help me fix this ? pls and thanks you

https://photos.google.com/share/AF1QipMjw3iey2Y50l7zpoGjFXAm5EfLUKGYa3SqecL66ZIx-7xSgVzh0HKhOrLmo_mnhw?key=Ym9FZ1Z3VnhQWkxsMzUxNXBWekNYdHpBcTJwTnBn

ducvu91 avatar Jul 10 '18 08:07 ducvu91

i am going to check it!

thinhbuzz avatar Jul 17 '18 07:07 thinhbuzz

iframe created automatic by reCapcha. Can you show your example source code?

thinhbuzz avatar Jul 17 '18 07:07 thinhbuzz

code when i show

config/captcha.php

return [ 'secret' => env('CAPTCHA_SECRET', 'xyz'), 'sitekey' => env('CAPTCHA_SITEKEY', 'xyz'), /** * @var string|null Default null. * Custom with function name (example customRequestCaptcha) or class@method (example \App\CustomRequestCaptcha@custom). * Function must be return instance, read more in folder examples */ 'request_method' => null, 'options' => [ 'multiple' => false, 'lang' => 'vi', ], 'attributes' => [ 'theme' => 'light' ], ];

in view : {!! app('captcha')->display($attributes = ['data-callback' => 'onReCaptchaSuccess'], $options = ['lang'=> 'vi']) !!}

ducvu91 avatar Jul 17 '18 08:07 ducvu91

:( i can not reproduce issue

thinhbuzz avatar Jul 17 '18 08:07 thinhbuzz

This is also happening to me. From my tests, it has to do with the languages that you have configured in your browser (tested both Firefox and Chrome) My browsers are configured to English first, so I always get English, no matter the parameter I specify in the options. If I change the browser preferences to another language, the captcha is displayed in that language, once again, ignoring the options.

nunomira avatar Sep 12 '18 18:09 nunomira