[opencms] Re: [opencms-dev] Locale

Stephan Hartmann beffe at beffe.de
Tue Mar 15 16:52:24 CET 2005


Hi Bernd,

you can set the locale as request parameter, for example
index.html?__locale=de
But this will last only for the current request.

Also, i want to point you to an alternative LocaleHandler that lets you
select the locale via a parameter "__setLocale" and stores this in a session
variable so it lasts over more one request.
You can find it in the archive:
http://article.gmane.org/gmane.comp.cms.opencms.devel/11715

Regards,
Stephan

----- Original Message -----
From: "Bernd Wolfsegger" <bw at code-create.com>
To: "The OpenCms mailing list" <opencms-dev at opencms.org>
Sent: Tuesday, March 15, 2005 4:09 PM
Subject: Re: [opencms] Re: [opencms-dev] Locale


Hi Stephen,

On Tuesday 15 March 2005 15:11, Stephan Hartmann wrote:
> You cannot create siblings of a folder. If you copy a folder with the
> option to create siblings of all resources, the folder and all its
> subfolders are still real copies. Only files become siblings. This still
> has the drawback that if you create a new file / folder in one language,
> you have to create the siblings / folders in the other languages by hand.
>
> I'd suggest to implement a new LocalHandler that returns the locale just
> depending on the host name.

Good idea too. But best would be to simply be able to set the locale used in
the page by having a method in the CmsJspActionElement or the
CmsRequestContext like setLocale(...). Internally this value should then be
used to determine which content to display.

regards, Bernd Wolfsegger


>
> Regards,
> Stephan
>
> ----- Original Message -----
> From: "Jorge González" <informatico at hotelparadisepark.com>
> To: <bw at code-create.com>; "'The OpenCms mailing list'"
> <opencms-dev at opencms.org>
> Sent: Tuesday, March 15, 2005 12:26 PM
> Subject: RE: [opencms] Re: [opencms-dev] Locale
>
> > >One problem with this approach is, that if you add new content
> > > documents,
> >
> > you
> >
> > >have to create siblings in each language folder for these new
documents.
> > >And that is prone to errors.
> >
> > You only have to define one sibiling for each language, pointing to the
>
> root
>
> > content folder.
> >
> > /en/sibiling_to_root_folder
> > /es/sibiling_to_root_folder
> > /de/sibiling_to_root_folder
> >
> > /root_content/content1/dog.xml
> >
> >
> > I remember there is a session property, to define default language
> > navigation. I will search the mailing list ...
> >
> >
> >
> > _______________________________________________
> > This mail is send to you from the opencms-dev mailing list
> > To change your list options, or to unsubscribe from the list, please
> > visit http://mail.opencms.org/mailman/listinfo/opencms-dev
>
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://mail.opencms.org/mailman/listinfo/opencms-dev


_______________________________________________
This mail is send to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://mail.opencms.org/mailman/listinfo/opencms-dev





More information about the opencms-dev mailing list