Closed (works as designed)
Project:
reCAPTCHA
Version:
7.x-1.7
Component:
General
Priority:
Critical
Category:
Feature request
Assigned:
Reporter:
Created:
9 Jan 2009 at 04:15 UTC
Updated:
29 Sep 2011 at 12:27 UTC
Jump to comment: Most recent file
Comments
Comment #1
account-deletion-needed commentedHere's also a patch for Drupal 6, which doesn't depend on the i18n module for translations anymore.
Comment #2
account-deletion-needed commentedSorry forgot to add a check to test if Drupal 6 localization is enabled. Patch updated:
Comment #3
robloachVery nice! I'll have a look at committing this on Monday.
Comment #4
joric commentedWhy not just:
// add language support
global $language;
$js .= ", lang:'".$language->language."'";
I've double checked it — it works (drupal 6.8).
It's a way better solution (most people don't use i18n module).
Oh, sorry, it was already posted there
http://drupal.org/node/360165
Comment #5
robloachCommitted to both Drupal 6 branch and Drupal 5 branches..... Mind testing it in 5.x-2.x-dev and 6.x-1.x-dev before I make the release?
Comment #6
joric commentedI think the checking is not nesessary
Just do the
$js .= ", lang:'" . $language->language . "'";
It'll work not only for i18 module.
Comment #7
robloachThe global $language is new to Drupal 6, so we'll still have to check in Drupal 5. Is 5.x-1.x-dev and 6.x-1.x-dev good with you guys?
Comment #8
mvcActually, this doesn't work, because reCAPTCHA requires two-character language codes, and Drupal allows postfixing a region, such as "pt-br". I'm posting an improved patch for 6.x-1.1. I suspect a similar fix is required for D5 but I didn't test that.
For now the reCAPTCHA folks just handle eight languages. For further support or better regional translations, we'll need the patch at #398362: Allow custom translation (although it looks like it needs some work). But I think this patch should go in regardless.
Comment #9
robloachWhoops, forgot this in the 1.2 release. Is this patch still okay?
Comment #10
mvcWe still need the call to substr() which is missing in 1.2. I don't know how $language gets set for sites not using locale.module, so I put this back into an if() block.
Here's a new patch rolled against 1.2. Sorry for forgetting to update the issue version with my last patch.
Comment #11
robloachThanks! http://drupal.org/cvs?commit=226020
Comment #13
knalstaaf commentedD7 port?
Comment #14
knalstaaf commentedComment #15
knalstaaf commented#1177498: Support for custom localization