portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jon Evans" <jon.ev...@misgl.com>
Subject Re: [patch] JetspeedLocalizationService
Date Fri, 07 Mar 2003 11:30:53 GMT
Massimiliano Dessì wrote:

> The language changes at runtime.

It does if you only have 1 resource bundle.

> I don't understand your problem with the change
> language.

Try this.  Put this in your TurbineResources.properties:

locale.default.bundles=bundle.test, \
    org.apache.jetspeed.modules.localization.JetspeedLocalization

and create a new file WEB-INF/classes/bundle/test.properties, 
containing one useless line:

hello=world

Now try and load the site (configured to use JetspeedLocalizationService).
Note that the $i10n.KEY statements *should* still work, because they 
will check the 
org.apache.jetspeed.modules.localization.JetspeedLocalization 
properties file(s) after failing to get the key from bundle.test.
However if you do try it I bet you don't get any localized strings 
because JLS throws a NullPointerException when it tries to look past 
the first bundle.

I was finding that the site worked fine (all of the strings in the 
content came from my bundle) but when I went to the new user 
registration page I got the NPE because it was trying to look in the 
second bundle.

The standard TurbineLocalizationService works fine but then of course 
you can't change the language on the fly.

Also the other point of my patch was that it is a waste of time 
extending another class and then reimplementing every method with a 
call to super.<method>.

> Test this file and send a feedback to me ,
> in this way i can help you

I can see how your filter works, will this be the new way?  The only 
thing I would add is a check for user!=null before the call to 
user.setPerm().

Jon
 
 
 
 
 
-- 
 
Merlin Information Systems Limited, 
 
Merlin House, Gawcott Road, Buckingham, United Kingdom. MK18 1TN
 
Tel: +44 (0) 1280 824331  Fax: +44 (0) 1280 824112
 

 
http://www.misgl.com
 
Provider of IT Services and Online Portal Support Services. 
 
 
 
Confidentiality:
 
The information contained in this email (including any attachments) is confidential and is
intended solely for the use of the named addressee. Access, copying or re-use of the information
in it by any other person is not authorised. If you are not the intended recipient, please
notify us immediately by telephone or by e-mail to admin@misgl.com
 

 
 
 
*** This mail has been scanned for viruses ***
 

 

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message