[Hippo-cms7-user] Adding support for a new language

Francesco Chicchiriccò francesco.chicchiricco at everett.it
Wed Feb 10 17:17:58 CET 2010


On 10/feb/10, at 16:07, Arje Cahn wrote:

>> All that I have to do is replace
>> in org.hippoecm.frontend.plugins.login.LoginPlugin line 181 from
>>         private List<String> locales = Arrays.asList(new String[]  
>> { "nl",
>> "en" });
>> to
>>         private List<String> locales = Arrays.asList(new String[]  
>> { "nl",
>> "en", "it" });
>> ?
>
> I guess so :)
>
> But it would be nice if this would not be hardcoded, but use the
> available languages in the system.
> So your translations plugin would register itself somewhere in the
> configuration stored in the repository, and the login screen renders
> the list from that config.
>
> I added that to HREPTWO-3781 [1]
> And I'll schedule it in (unless you beat us to it, of course :) )
>
>> If so, I have added my own LoginPlugin in a separate JAR, by just  
>> copying
>> the whole code from ECM sources.
>> Unfortunately, I cannot see anything editable via console
>> under /hippo:configuration/hippo:frontend/login: where's my mistake?
>
> /hippo:configuration/hippo:frontend/login/login/loginPage/@plugin.class 
>  ?
>
> (now all we need is a JCR classloader so you can hotdeploy  
> translations :) )
>
> BTW - I've always dreamt of having these translation texts editable
> from within the CMS itself, so you can use some key/value editor in
> the CMS

I've got a first ugly working version, using my own  
org.hippoecm.frontend.plugins.login.LoginPlugin modified as above.
I think I can better keep using my own version to actually translate  
labels to italian, waiting for the Polyglot plugin to roll out ;-)

Cheers.

> [1] https://issues.onehippo.com/browse/HREPTWO-3781



More information about the Hippo-cms7-user mailing list