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 Audrey MORELLE <au...@yahoo.fr> on 2006/06/26 09:38:43 UTC

J2 - Language and profile

Hi,
   
  I read many mails in the list but I didn't suceed to do what I need on Jetspeed 2.
   
  Actually, I have two roles (I will call them role1 and role2) and two languages french and english.
  I found how to redirect user with a role to the psml corresponding but I need to translate the titles of the portlet in the language used by the user.
   
  I was looking to define in the psml with a metadata on the fragment of every portlet but it doesn't work. 
  So I thought to use two different psml with the translated titles on each fragment but I didn't manage to redirect on the right psml.
   
  I read Marina's message and Randy's answer here :
  http://www.mail-archive.com/jetspeed-user@jakarta.apache.org/msg14542.html
  But I failed to do anything with that.
   
  I made directories and put psml like that :
  /_role/role1/_language/fr/default_page.psml
  /_role/role1/_language/en/default_page.psml
  /_role/role1/default_page.psml
  and the same for role2
   
  I have user1 with role1 and profile : name = page, value = role-fallback
  I tried some profile but in fact, I don't know what should be field in the profile and I only manage to redirect to /_role/role1/default_page.psml
   
  What should I do ?
  Do you have any solution for me ?
   
  Sorry for my english (wich I suspect to make me have misunderstood...)
   
  Audrey

 		
---------------------------------
 Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire.

Re: J2 - Language and profile

Posted by David Sean Taylor <da...@bluesunrise.com>.
I havent tested this yet, but give this a try:

insert into PROFILING_RULE values ('role-language-fallback',
      'org.apache.jetspeed.profiler.rules.impl.RoleFallbackProfilingRule',
      'A role language based fallback algorithm based on Jetspeed-1 
role-based fallback');
insert into RULE_CRITERION values ('60', 'role-language-fallback', 0, 
'role', 'role', null, 2);
insert into RULE_CRITERION values ('61', 'role-language-fallback', 1, 
'path.session', 'page', 'default-page', 0);
insert into RULE_CRITERION values ('62', 'role-language-fallback', 2, 
'language', 'language', null, 1);


Audrey MORELLE wrote:
> Hi,
>    
>   I read many mails in the list but I didn't suceed to do what I need on Jetspeed 2.
>    
>   Actually, I have two roles (I will call them role1 and role2) and two languages french and english.
>   I found how to redirect user with a role to the psml corresponding but I need to translate the titles of the portlet in the language used by the user.
>    
>   I was looking to define in the psml with a metadata on the fragment of every portlet but it doesn't work. 
>   So I thought to use two different psml with the translated titles on each fragment but I didn't manage to redirect on the right psml.
>    
>   I read Marina's message and Randy's answer here :
>   http://www.mail-archive.com/jetspeed-user@jakarta.apache.org/msg14542.html
>   But I failed to do anything with that.
>    
>   I made directories and put psml like that :
>   /_role/role1/_language/fr/default_page.psml
>   /_role/role1/_language/en/default_page.psml
>   /_role/role1/default_page.psml
>   and the same for role2
>    
>   I have user1 with role1 and profile : name = page, value = role-fallback
>   I tried some profile but in fact, I don't know what should be field in the profile and I only manage to redirect to /_role/role1/default_page.psml
>    
>   What should I do ?
>   Do you have any solution for me ?
>    
>   Sorry for my english (wich I suspect to make me have misunderstood...)
>    
>   Audrey
> 
>  		
> ---------------------------------
>  Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire.


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


Re: J2 - Language and profile

Posted by Randy Watler <wa...@wispertel.net>.
Audrey,

you almost have it right... role-fallback does not support language; you
just need to define a custom profile rule. See the samples on the list
and in the *.sql files.

HTH,

Randy

On Mon, 2006-06-26 at 09:38 +0200, Audrey MORELLE wrote:
> Hi,
>    
>   I read many mails in the list but I didn't suceed to do what I need on Jetspeed 2.
>    
>   Actually, I have two roles (I will call them role1 and role2) and two languages french and english.
>   I found how to redirect user with a role to the psml corresponding but I need to translate the titles of the portlet in the language used by the user.
>    
>   I was looking to define in the psml with a metadata on the fragment of every portlet but it doesn't work. 
>   So I thought to use two different psml with the translated titles on each fragment but I didn't manage to redirect on the right psml.
>    
>   I read Marina's message and Randy's answer here :
>   http://www.mail-archive.com/jetspeed-user@jakarta.apache.org/msg14542.html
>   But I failed to do anything with that.
>    
>   I made directories and put psml like that :
>   /_role/role1/_language/fr/default_page.psml
>   /_role/role1/_language/en/default_page.psml
>   /_role/role1/default_page.psml
>   and the same for role2
>    
>   I have user1 with role1 and profile : name = page, value = role-fallback
>   I tried some profile but in fact, I don't know what should be field in the profile and I only manage to redirect to /_role/role1/default_page.psml
>    
>   What should I do ?
>   Do you have any solution for me ?
>    
>   Sorry for my english (wich I suspect to make me have misunderstood...)
>    
>   Audrey
> 
>  		
> ---------------------------------
>  Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire.


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