You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Guillaume Math� <gm...@smartinnov.com> on 2001/08/21 19:28:46 UTC

Re: Accentuated characters in references (quite OT)

Original message from: Lane Sharman
[...]
>sensible terms to the french eye and mind. Of course, this becomes, to a degree, the impedance mismatch between a template parser and javac 
because there will
>never be perfect symmetry among the two.
>
>on fait ce que on peut dans la vie, mon vieux...
Hé oui :(

Our template writer has already
-learned VTL
-learned CSS2 (i pushed him enough for that)
-learned to replace spaces in sentences with '_' and to prefix them with '$'
-learned to avoid quotes, or other deadly symbols in these references
So why does he seem tired ? :)

Nevertheless i18n integration with Velocity was seamless compared to previous projects i have been into (which obviously didn't include a templating 
engine).
I dont see any smarter idea to develop a localized web app.

(something i forgot about your first reply: yes i see your point, it's nice and clean, but that's 1 label per object. Here we have 15+ labels per object... Not 
counting Servlet-specific labels, site browsing labels, etc.... Moreover it's written to use servlets+velocity as well as swing+swing for client-server 
operation. Still, i welcome any other idea)

Regards,
Guillaume Mathé


Re: Accentuated characters in references (now very OT)

Posted by Lane Sharman <la...@san.rr.com>.
"Guillaume Mathé" wrote:

> Original message from: Lane Sharman
> [...]
> (something i forgot about your first reply: yes i see your point, it's nice and clean, but that's 1 label per object. Here we have 15+ labels per object... Not
> counting Servlet-specific labels, site browsing labels, etc.... Moreover it's written to use servlets+velocity as well as swing+swing for client-server
> operation. Still, i welcome any other idea)

Generally, my approach for localization is to make each attribute of an object localizable. Further, the collection of the attributes is what gets proxied across
the network to the swing, velocity and database services. java.lang.Object and reflection are inadequate or subject to misinterpretation. Thus, any
viewable/storable object carries with it in my universe a map of FieldData and MetaData. I documented this because I thought in case I got hit by a truck, my team
would at least understand where I was coming from:

http://engineering.acctiva.org/jldap/

Guillaume, I tried to write templates so that, when undergoing translation, the variables were immutable as to spelling, accents, etc and that the literal content
was the only content that required to be changed. It seems that you have implied that a template writer in France would write $Client_Prénom and the english
translator would be free to write $Client_First_Name. I do not do things like this but on thinking about it, it certainly makes the templates and text documents
more readable in the native language of the translator.

This makes the keys localized as well as the values. I would still abandon the use of ResourceBundle and use a direct dictionary scheme for the keys as well as
the values.

-lane

Regards,

> Guillaume Mathé

--
Lane Sharman
http://corporate.acctiva.com/lane