[opencms-dev] getting the locale of a page within <% %>
Panos Kavalagios
Panagiotis.Kavalagios at eurodyn.com
Fri Mar 17 13:28:18 CET 2006
This is by far the best answer for your question and forget my
approach which was more taglib oriented. Just in case you do not need
current page's locale and you would like to retrieve the nagation
element's locale, call the getLocale method directly:
<%= navElement.getLocale() %>
where navElement is a CmsJspNavElement.
Regards,
Panos
Robert Petermeier wrote:
> Hi Christoph,
>
> Christoph P. Kukulies wrote:
>> My navigation needs to display different images containing
>> names in german resp. english. I need to decide whether the
>> locale is String "de" or String "en" and build the
>> image name src="/galleries/pics/"<%=locale%>_navicon"
>
> <%= cmso.getRequestContext().getLocale().getLanguage() %>
>
> is probably what you are looking for. 'cmso' is an instance of
> CmsObject, as you might have guessed;-)
>
>
> Robert
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please
> visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
--
Panagiotis Th. Kavalagios
Electrical & Computer Engineer
European Dynamics S.A.
Athens, Hellas
Tel: +30-210-8094500
More information about the opencms-dev
mailing list