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
language.xreg
Description: Binary data
ChangeLanguagePortlet.java
Description: Binary data
ConstructorHtml.java
Description: Binary data
CustomLocalization.java
Description: Binary data
CustomLocalizationService.java
Description: Binary data
CustomLocalizationTool.java
Description: Binary data
JetspeedLocalizationService.java
Description: Binary data
<<attachment: ic_ja.gif>>
<<attachment: ic-de.gif>>
<<attachment: ic-en.gif>>
<<attachment: ic-es.gif>>
<<attachment: ic-fr.gif>>
<<attachment: ic-it.gif>>
Questa email e' stata controllata dal RAV AntiVirus.
-- To unsubscribe, e-mail: <mailto:jetspeed-user-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:jetspeed-user-help@;jakarta.apache.org>