[opencms-dev] Frontend/Website Localization

Rüdiger Kurz r.kurz at alkacon.com
Thu Nov 14 14:54:15 CET 2013


Hi,

version 9 introduces a new resource type: xmlvfsbundle that offers the 
capability to edit message keys using the XML content editor. More over 
those messages will be available at runtime (compared with Java property 
files this is a real benefit).

In order to use those bundles in JSPs, you have use <cms:bundle>-Tag 
instead of <fmt:bundle>-Tag. Here a code snippet:

[...]
<fmt:setLocale value="${cms.locale}" />
<cms:bundle basename="com.alkacon.bootstrap.schemas.blog">
[...]
	<fmt:message key="bootstrap.blog.message.readmore" />
[...]
</cms:bundle>
[...]

HTH
Rüdiger

-------------------

Rüdiger Kurz

Alkacon Software GmbH  - The OpenCms Experts
http://www.alkacon.com - http://www.opencms.org

Am 14.11.2013 11:08, schrieb Thorsten Duhn:
> Hello,
>
> as the "Frontend/Website Localization" chapter is still empty in 9.0.0
> documentation and I cannot see how it works just on looking at bootstrap
> example (and cannot find another information source). I would like to
> ask if someone may explain it to me. Is there a way to use "XML Resource
> Bundle" to store translations for use in template files? How to name,
> where to store, how to use? If not, what is the intended way to store
> translations and are steps like reinitialisation of workspace still in
> need after updates or additions in bundles?
>
> In my template module I created and filled
> "\{my.template}\i18n\{my.template}.messages"
> and in my main.jsp I use
> <fmt:setLocale value="${cms.locale}" />
> and then stuff like
> <fmt:message key="my.template.title" />
>
> All I get is "???my.template.title???".
>
> Do I need to add some configuration somewhere?
>
> Regards,
> Thorsten



More information about the opencms-dev mailing list