cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Engelhart <mengelh...@earthtrip.com>
Subject External Entities & bundles
Date Wed, 17 May 2000 23:22:34 GMT
OK, I've run into yet another problem with Cocoon and i18n...somehow I feel
that i'm the only person making a localized application. :-)

Anyway, because I want to separate presentation from data, I have resorted
to using ResourceBundle's from within my stylesheets to access localized
strings based on the users browser setting (or session setup).  This works
fine except that most non-english languages use non-ascii characters like
&auml;

When I get the string from my PropertyResourceBundle by using this call:

<xsl:value-of select="java:getString($bundle, 'SOME_TEXT')"/>

Assume that the key/value looks like:
SOME_TEXT=S&ouml;me Text Label


I just get the actual entity in my HTML output.  The same goes if I put this
in the ResourceBundle
SOME_TEXT=S&#223;me Text Label

One suggestion on the users list was to do the ResourceBundle.getString()
call from the XSP which may work but this totally ruins the separation of
presentation from data.  I don't want to have things like this in my XML
<textlabel>Some Text Label<textlabel> which has nothing to do with my data.

I tried putting the entity's characters directly into the
PropertyResourceBundle but that just comes out as "?" in my HTML.

Anyone who has any ideas about this please let me know.

thanks,
Mike




Mime
View raw message