Webmobo
September 07, 2010, 06:11:01 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Moved from PHPBB to SMF. All your settings have been moved over
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Front-end localization issues, tied to WB News and HNCaptcha  (Read 207 times)
Yakiv
Moderator
Newbie
*****
Posts: 220


View Profile
« on: March 08, 2010, 10:12:02 am »

I have my back-end administration set to one language and my front-end set to another language, through the use of the following code:

Code:
Locale::getInstance()->setLocale( "en" );

This is working, for the most part, but I noticed a bug, with regard to the hncaptcha.  It relates to the bit of text under the verification code.  It is displaying in the language of the back-end administrative (configuration page) setting.

There are two sections in the hn_captcha.class.php file, which allow for localization.

One starts with:

Code:
            $usedchars = $this->use_only_md5 ? 'A..F' : 'A..Z';
            $this->usedchars = $usedchars;
            $this->messages = array(

And the other starts with:

Code:
private function notvalid_msg()

If you can offer a fix for this, it would be greatly appreciated.  I thought about just deleting the first messages, but the second set of messages are actually error messages.  So, it's not a good idea to just delete these to get it to "work" without localization conflicts.  It would be better to actually fix it.

My guess is, something more needs to be added to this, to get the hncaptcha to pick up the localization on a front end page, using this code:

Code:
Locale::getInstance()->setLocale( "en" );
Logged
Yakiv
Moderator
Newbie
*****
Posts: 220


View Profile
« Reply #1 on: March 08, 2010, 10:39:43 am »

I do have a few more concerns, based on further testing that I am seeing, when logging into the front-end.  If I have two different front-ends (which I do), one in one language and one in another language, and I have registered users, which are not able to change any settings, since they do not have access to the back-end, then their language setting really needs to be displaying based on this:

Code:
Locale::getInstance()->setLocale( "en" );

that I put in the code on the front-end.  Otherwise, they may register on one front-end in let's say, French, where they understand the language, and then not understand the captcha instructions or error messages in English, since that is the default on the back-end or it may be my setting on the back-end.
Logged
Yakiv
Moderator
Newbie
*****
Posts: 220


View Profile
« Reply #2 on: March 08, 2010, 06:57:10 pm »

If you have a moment to help with this one, this is the next thing to fix for me.
Logged
Yakiv
Moderator
Newbie
*****
Posts: 220


View Profile
« Reply #3 on: March 10, 2010, 07:40:59 am »

I also would like to include the captcha entry/input field in the tabindexing, like I have for the other input fields in my send to friend and comment forms:

Code:
tabindex=\"$tabindex\"

Is there an easy way to get the captcha input field to pick-up the proper tabindex?  For instance, on my send to friend form, it would be 6th tab index on the form, like:

Code:
tabindex="6"

Presently, there is no tabindex for the captcha input field.  ...Thanks! Smiley
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!