Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow user to specify display language of widget #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

oiami
Copy link
Contributor

@oiami oiami commented Feb 22, 2016

From issue #2

# Initialize the user agent object
$self->{ua} = HTTP::Tiny->new(
agent => 'Captcha::reCAPTCHA::V2/'.
($Captcha::reCAPTCHA::V2::VERSION || 0) . ' (Perl)'
);

$self->{widget_api} = 'https://www.google.com/recaptcha/api.js?'.
'onload=onloadCallback&render=explicit';
'onload=onloadCallback&render=explicit&hl='.$hl;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi. Why not only concatenate $hl only if defined so you let captcha widget guess the language?
Like:
'onload=onloadCallback&render=explicit' . defined($hl) ? "&hl=$hl" : '';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants