Captcha Internationalization
Hardik Rajani
Data Modeling & Business Logic
Description
Liferay is providing Captcha implementation using Numeric. It would be all that you might require. But in case if customer is asking for the internationalization for his regional language. It might be possible that customer would like to have a captcha with regional language. This hook will let you implement internationalized captcha with very simple way. Once you will enable this hook, it will fetch languageId of user. And according to the languageId, hook will try to find captcha textProducer implementation.
Liferay is using SimpleCaptcha for implementing Captcha functionality. I have also used the same API. This API is currently providing following text Producer. Please find the following link for the API also.
1) ArabicTextProducer
2) ChineseTextProducer
3) FiveLetterFirstNameTextProducer
4) NumbersAnswerProducer
http://simplecaptcha.sourceforge.net/
In case you need for some other language. You just simply need to implement text producer. It is also very simple implementation that any developer can do. Please find the following link for the reference to develop new text producer.
http://wellofjava.blogspot.com/2014/07/simple-captcha-text-producer.html
For using this hook, simply install the hook in Liferay and specify the property by overriding the following settings in your hook's portal.properties:
#
# Set whether or not to use captcha checks for create account. Hook will make this to false. This will disable Liferay’s captcha for create account page.
#
captcha.check.portal.create_account=false
#
# Set whether or not to use custom captcha checks for create account. Hook will make this to true. This will enable custom captcha for create account page.
#
captcha.check.portal.create_account.custom=true
#
# Following is the example of how to use custom Text Producer. For adding more language support for the captcha. You just need to add one property with the languageId as suffix.
#
captcha.engine.simplecaptcha.text.producers.en_US=nl.captcha.text.producer.NumbersAnswerProducer
captcha.engine.simplecaptcha.text.producers.ar_SA=nl.captcha.text.producer.ArabicTextProducer
captcha.engine.simplecaptcha.text.producers.zh_CN=nl.captcha.text.producer.ChineseTextProducer
There is one open issue with language portlet for guest user.
https://issues.liferay.com/browse/LPS-42075
Till this issue gets fixed, you will need to change portal default language to test this hook.
Go to Control Panel -> Portal settings -> Display Settings.
Liferay is using SimpleCaptcha for implementing Captcha functionality. I have also used the same API. This API is currently providing following text Producer. Please find the following link for the API also.
1) ArabicTextProducer
2) ChineseTextProducer
3) FiveLetterFirstNameTextProducer
4) NumbersAnswerProducer
http://simplecaptcha.sourceforge.net/
In case you need for some other language. You just simply need to implement text producer. It is also very simple implementation that any developer can do. Please find the following link for the reference to develop new text producer.
http://wellofjava.blogspot.com/2014/07/simple-captcha-text-producer.html
For using this hook, simply install the hook in Liferay and specify the property by overriding the following settings in your hook's portal.properties:
#
# Set whether or not to use captcha checks for create account. Hook will make this to false. This will disable Liferay’s captcha for create account page.
#
captcha.check.portal.create_account=false
#
# Set whether or not to use custom captcha checks for create account. Hook will make this to true. This will enable custom captcha for create account page.
#
captcha.check.portal.create_account.custom=true
#
# Following is the example of how to use custom Text Producer. For adding more language support for the captcha. You just need to add one property with the languageId as suffix.
#
captcha.engine.simplecaptcha.text.producers.en_US=nl.captcha.text.producer.NumbersAnswerProducer
captcha.engine.simplecaptcha.text.producers.ar_SA=nl.captcha.text.producer.ArabicTextProducer
captcha.engine.simplecaptcha.text.producers.zh_CN=nl.captcha.text.producer.ChineseTextProducer
There is one open issue with language portlet for guest user.
https://issues.liferay.com/browse/LPS-42075
Till this issue gets fixed, you will need to change portal default language to test this hook.
Go to Control Panel -> Portal settings -> Display Settings.
Liferay is trademark of Liferay, Inc., Liferay International Limited and/or Liferay Affiliate, registered in the United States and/or other countries.
License
Release Summary and Release Notes
Version | Change Log | Supported Framework Versions | Date Added |
---|---|---|---|
1 |
Liferay Portal 6.1 CE GA2
Liferay Portal 6.1 EE GA2+
Liferay Portal 6.2 CE GA1+
Liferay Portal 6.1 CE GA3
Liferay Portal 6.2 EE GA1+
|
2014-07-29 |
DEVELOPER
Hardik Rajani
Published Date
Version
1
Supported Versions
6.2, 6.1
Edition
EE, CE
Price
Free
Help & Support
Terms & Conditions
SHARE LINK
Installation Instructions
This is a Legacy App that is no longer available in the new App Marketplace. You are able to acquire it from your installed DXP or CE instance and install it by following the instructions below.
Acquiring this App through the legacy Liferay Portal Store
- Review app documentation for any specific installation instructions.
- Login to your Liferay Portal instance with administrative permissions.
- Navigate to the Control Panel, Marketplace (or Apps for 7.3 and prior), then Store.
- If needed, login to your Liferay.com account by choosing Sign In.
- Search for the app name in the Search dialog.
- Once the app is found, click on the app in the search results.
- On the app details page, choose to acquire the app by selecting the Free, Buy, or Trial button.
- Follow the instructions on the screen to complete the acquisition.
Installing this App through legacy Liferay Portal Purchased Apps
- After acquiring the app, login to your Liferay Portal instance with administrative permissions.
- Navigate to the Control Panel, Marketplace (or Apps for 7.3 and prior), then Purchased.
- If needed, login to your Liferay.com account by choosing Sign In.
- Click the Install button to install your app on your Liferay Portal instance.
See the legacy App Marketplace help documentation for more information.