<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Thank you !<br>
<br>
It works, here is my test jsp code snippet...<br>
<br>
jsp-jsp-jsp-jsp-jsp-jsp-jsp-jsp-jsp-jsp-jsp-jsp-jsp-jsp-jsp-jsp-<br>
<br>
<%@page import="org.opencms.jsp.*, org.opencms.file.*,
org.opencms.flex.*, java.util.*" %><br>
<br>
<%@ taglib prefix="cmstag" uri=<a class="moz-txt-link-rfc2396E" href="http://www.opencms.org/taglib/cms">"http://www.opencms.org/taglib/cms"</a>
%><br>
<br>
<%<br>
org.opencms.i18n.CmsResourceBundleLoader.flushBundleCache();<br>
java.util.ResourceBundle messages =
org.opencms.i18n.CmsResourceBundleLoader.getBundle("your_bundle_here",
new java.util.Locale("es"));<br>
%><br>
<br>
<br>
<%= messages.getString("test.label1") %><br>
<br>
jsp-jsp-jsp-jsp-jsp-jsp-jsp-jsp-jsp-jsp-jsp-jsp-jsp-jsp-jsp-jsp-<br>
<br>
Note: You can flush your keys with
org.opencms.i18n.CmsResourceBundleLoader.flushBundleCache();<br>
Note2: You will get an exception if the key is not found in that
bundle, this is not a problem, just add the key and flush before hit
the jsp again !!<br>
Note3: For intense i18ned projects, it could be very useful to have a
bundle editor, so you can see the tags not translated, etc.<br>
<br>
<br>
Alexander Kandzior escribió:
<blockquote cite="mid012101c6dd9b$00cafc10$d700a8c0@PLAGUEIS"
type="cite">
<pre wrap="">Actually we have implemented such a feature in OpenCms 6.2.
All OpenCms module based message bundles are flushed if you clear the cache,
which can be triggered by "Administration View > Workplace Tools >
Re-Initialize the Workplace".
You can also use this caching behaviour in your Java code like this:
org.opencms.i18n.CmsResourceBundleLoader.getBundle(baseName, locale);
which is the same as
java.util.resourceBundle.getBundle(baseName, locale);
only that we do have the flushable bundle cache.
Kind Regards,
Alex.
-------------------
Alexander Kandzior
Alkacon Software GmbH - The OpenCms Experts
<a class="moz-txt-link-freetext" href="http://www.alkacon.com">http://www.alkacon.com</a> - <a class="moz-txt-link-freetext" href="http://www.opencms.org">http://www.opencms.org</a>
</pre>
<blockquote type="cite">
<pre wrap="">-----Original Message-----
From: <a class="moz-txt-link-abbreviated" href="mailto:opencms-dev-bounces@opencms.org">opencms-dev-bounces@opencms.org</a>
[<a class="moz-txt-link-freetext" href="mailto:opencms-dev-bounces@opencms.org">mailto:opencms-dev-bounces@opencms.org</a>] On Behalf Of Jorge González
Sent: Thursday, September 21, 2006 2:33 PM
To: The OpenCms mailing list
Subject: [opencms-dev] Different i18n management
Hi list:
I don't know if it's only bothering to me, but it's a pain to
work with
i18n'ed jsp pages, and restart the container every time I
want to see if
the keys are working ok.
I've used other apps, like the itracker issue tracker project (java),
and they solve this kind of problems very well, using a reloadable
bundle with a bundle editor, so you can improve the jsp
creation time,
because you don't have to check and restart every 5 minutes.
Do you think this could be a good idea for a new module ?
_______________________________________________
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
<a class="moz-txt-link-freetext" href="http://lists.opencms.org/mailman/listinfo/opencms-dev">http://lists.opencms.org/mailman/listinfo/opencms-dev</a>
</pre>
</blockquote>
<pre wrap=""><!---->
_______________________________________________
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
<a class="moz-txt-link-freetext" href="http://lists.opencms.org/mailman/listinfo/opencms-dev">http://lists.opencms.org/mailman/listinfo/opencms-dev</a>
</pre>
</blockquote>
<br>
</body>
</html>