You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Massimiliano Dessi <ma...@gruppoatlantis.it> on 2002/10/30 18:12:25 UTC
CustomLanguage service +portlet
I'd like to give to the jetspeed comunity the sources of a
portlet and the correlated service to change the current language.
Jetspeed by default reads the header from the request and to change
the language is necessary to modify the browser settings.
How it works:
this service is similar to the original localization and it works in the
same way
until the use of the changeLanguage portlet
If a user changes the language from the portlet, the new language is set
and remains or he can change it again when he wants,
without the browser rules.
If it is necessary he can use not official languages ( minority languages)
that the browser doesn't use.
The service can be compiled with jdk 1.4.1 or 1.3.1 as described in the
code.
For the portlet it' s possible to view the label of the state or view the
flag of the country as described in the code.
If the developer wants to add other languages , he have to add the file "
JetspeedLocalization_newlanguage.properties"
in the jetspeed.jar and add the link " cL=newlanguage" in a
contructorHtml.java
After compile put the classes in jetspeed\WEB-INF\classes\ , the
language.xreg in the folder conf
To start the service comment the original service
#services.LocalizationService.classname=org.apache.turbine.services.localiza
tion
and add the follow string
services.LocalizationService.classname=org.apache.jetspeed.services.customlo
calization.JetspeedLocalizationService
and comment the original tool
#tool.request.l10n=org.apache.turbine.services.localization.LocalizationTool
and add the follow string
tool.request.l10n=org.apache.jetspeed.services.customlocalization.CustomLoca
lizationTool
Enjoy it