protected function i18n($key = NULL, $path = NULL)
	{
		static $RECAPTCHA_LANG;

		if ( $RECAPTCHA_LANG ) {
			return isset($key) ? $RECAPTCHA_LANG[$key] : $RECAPTCHA_LANG;
		}

		if ( !isset($this->_recaptchaOptions['lang']) ) {
			$language = $this->clientLang();
		} else {
			$language = $this->_recaptchaOptions['lang'];
		}

		$RECAPTCHA_LANG = array(
			'instructions_visual' => 'Enter the words above:',
			'instructions_audio'  => 'Type what you hear:',
			'play_again'          => 'Play sound again',
			'cant_hear_this'      => 'Download sound as MP3',
			'visual_challenge'    => 'Get an image CAPTCHA',
			'audio_challenge'     => 'Get an audio CAPTCHA',
			'refresh_btn'         => 'Get another CAPTCHA',
			'help_btn'            => 'Help',
			'incorrect_try_again' => 'Incorrect, please try again.'
			);

	  	// default: path/to/vendor/lib/ReCaptcha/I18n/recaptcha.lang.[langcode].php
		$path = ( NULL === $path )
			? __DIR__ . DIRECTORY_SEPARATOR . 'I18n'
			: $path;

		$language_file = rtrim($path, '/') . DIRECTORY_SEPARATOR . 'recaptcha.lang.' . $language . '.php';

		if ( file_exists( $language_file  ) ) {

			include_once $language_file;
		}

		return isset($key) ? $RECAPTCHA_LANG[$key] : $RECAPTCHA_LANG;
	}
protected function i18n($key = NULL, $path = NULL)
	{
		static $RECAPTCHA_LANG;

		if ( $RECAPTCHA_LANG ) {
			return isset($key) ? $RECAPTCHA_LANG[$key] : $RECAPTCHA_LANG;
		}

		if ( !isset($this->_recaptchaOptions['lang']) ) {
			$language = $this->clientLang();
		} else {
			$language = $this->_recaptchaOptions['lang'];
		}

		$RECAPTCHA_LANG = array(
			'instructions_visual' => 'Enter the words above:',
			'instructions_audio'  => 'Type what you hear:',
			'play_again'          => 'Play sound again',
			'cant_hear_this'      => 'Download sound as MP3',
			'visual_challenge'    => 'Get an image CAPTCHA',
			'audio_challenge'     => 'Get an audio CAPTCHA',
			'refresh_btn'         => 'Get another CAPTCHA',
			'help_btn'            => 'Help',
			'incorrect_try_again' => 'Incorrect, please try again.'
			);

	  	// default: path/to/vendor/lib/ReCaptcha/I18n/recaptcha.lang.[langcode].php
		$path = ( NULL === $path )
			? __DIR__ . DIRECTORY_SEPARATOR . 'I18n'
			: $path;

		$language_file = rtrim($path, '/') . DIRECTORY_SEPARATOR . 'recaptcha.lang.' . $language . '.php';

		if ( file_exists( $language_file  ) ) {

			include_once $language_file;
		}

		return isset($key) ? $RECAPTCHA_LANG[$key] : $RECAPTCHA_LANG;
	}
protected function i18n ( $ key = NULL , $ path = NULL ) { static $ RECAPTCHA_LANG ; if ( $ RECAPTCHA_LANG ) { return isset ( $ key ) ? $ RECAPTCHA_LANG [ $ key ] : $ RECAPTCHA_LANG ; } if ( ! isset ( $ this -> _recaptchaOptions [ 'lang' ] ) ) { $ language = $ this -> clientLang ( ) ; } else { $ language = $ this -> _recaptchaOptions [ 'lang' ] ; } $ RECAPTCHA_LANG = array ( 'instructions_visual' => 'Enter the words above:' , 'instructions_audio' => 'Type what you hear:' , 'play_again' => 'Play sound again' , 'cant_hear_this' => 'Download sound as MP3' , 'visual_challenge' => 'Get an image CAPTCHA' , 'audio_challenge' => 'Get an audio CAPTCHA' , 'refresh_btn' => 'Get another CAPTCHA' , 'help_btn' => 'Help' , 'incorrect_try_again' => 'Incorrect, please try again.' ) ; // default: path/to/vendor/lib/ReCaptcha/I18n/recaptcha.lang.[langcode].php $ path = ( NULL === $ path ) ? __DIR__ . DIRECTORY_SEPARATOR . 'I18n' : $ path ; $ language_file = rtrim ( $ path , '/' ) . DIRECTORY_SEPARATOR . 'recaptcha.lang.' . $ language . '.php' ; if ( file_exists ( $ language_file ) ) { include_once $ language_file ; } return isset ( $ key ) ? $ RECAPTCHA_LANG [ $ key ] : $ RECAPTCHA_LANG ; }
Fetch I18n language line

@param string $key The string translated
@param string $path Optional path to your own language file
@return array|string
Fetch I18n language line