You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by Ieong Alex <al...@msn.com> on 2004/03/31 03:19:10 UTC
Re: Suggest global Localization properties (Also UTF-8 properties files!)
Hi,
I think this may not be a good idea. XML file requires a good editor for common translator and needs to validate. And I am not sure it's worth to change.
Best Regards,
Alex.
>From: Sadanori Ito <si...@htf.highway.ne.jp>
>Reply-To: "Tapestry development" <ta...@jakarta.apache.org>
>To: "Tapestry development" <ta...@jakarta.apache.org>
>Subject: Re: Suggest global Localization properties (Also UTF-8 properties files!)
>Date: Wed, 31 Mar 2004 01:39:23 +0900
>
>Hi,
>
>I'm using *.properties + native2ascii for messages, now.
>But, I don't like this combination, because \u unicode escape format's
>very low readability.
>
>I want to use XML files for messages.
>
>My suggestion is based on the Java package hierarchy.
>
>1. <message-resource> position indicates message sharing level.
> application, package (library ?), component
>2. We can use the functionality of XML.
> encoding, parameter entity, ...
>3. Tapestry engine would search -
> 1st - Page or Component FQCN
> 2nd - upper level package
> ...
>
>Tapestry workbench example:
>
><?xml version="1.0" encoding="UTF-8"?>
><message-resources>
><org>
> <apache>
> <tapestry>
> <workbench>
> <!-- application 'Workbench' level messages -->
> <message-resource key="window.title"
> value="Tapestry Component Workbench"/>
> <message-resource key="prompt.display-request-debug">
> Display Request Debug Information
> </message-resource>
>
> <components>
> <Border>
> <!-- component 'Border' level messages -->
> <message-resource key="Localization" value="L10N"/>
> <message-resource key="Fields" value="Fields"/>
> </Border>
> </components>
>
> <table>
> <!-- package 'org.apache.tapestry.workbench.table' level messages -->
> <message-resource key="foo" value="bar"/>
> <message-resource key="Hello">World!</message-resource>
>
> <LocaleSelection>
> <!-- component 'LocaleSelection' level messages -->
> <message-resource key="locale" value="Locale"/>
> <message-resource key="verbosity" value="Verbosity"/>
> </LocaleSelection>
> </table>
> </workbench>
> </tapestry>
> </apache>
></org>
>
><!-- global(?) level messages
><message-resource key="hoge" value="huga"/>
>
><other>
> <domain>
> <package>
> ...
> </package>
> </domain>
></other>
>-->
></message-resources>
>
>-----
>
>For localization:
>
><?xml version="1.0" encoding="UTF-8"?>
> ...
> <message-resource key="Hello">World!</message-resource>
> <message-resource key="Hello" lang="ja">
> [Japanese "World!"]
> </message-resource>
> ...
>
>or
>
>File name based localization:
>
>workbench.xml
>workbench_ja.xml
>...
>
>---
>
>Because a hyphen char '-' can't be used in package and class names,
>I explained with <message-resource>. But, I think this element name is
>long for key typing :-) Any better and shorter name ?
>
>Thanks in advance,
>Sada
>
>On Mon, 29 Mar 2004 08:21:51 -0500
>Erik Hatcher <er...@ehatchersolutions.com> wrote:
>
> > On Mar 29, 2004, at 7:22 AM, Mindbridge wrote:
> > > 1. Not using the standard Properties parsing, but making specific one
> > > that
> > > is not limited to ISO8859-1 and does not require the use of
> > > 'native2ascii'
> > > as a result.
> > >
> > > ...
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>
_________________________________________________________________
在您的行動裝置上傳送接收 Hotmail 郵件,請移至: http://zh-asiasms.mobile.msn.com
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
Re: Suggest global Localization properties (Also UTF-8 properties files!)
Posted by Sadanori Ito <si...@htf.highway.ne.jp>.
Hi,
I didn't put this topic in perspective of translator's environments.
Fortunately, Tapestry is very flexible framework, I'll try to implement
my custom engine in our application.
I think 'Commons Configuration' - like approach may be more suitable
solution. It enables an application to read configuration data from
a variety of sources - properites, XML, JNDI, JDBC.
Thanks,
Sada
On Wed, 31 Mar 2004 09:19:10 +0800
"Ieong Alex" <al...@msn.com> wrote:
> Hi,
>
> I think this may not be a good idea. XML file requires a good editor
> for common translator and needs to validate. And I am not sure it's
> worth to change.
>
> Best Regards,
> Alex.
>
> >From: Sadanori Ito <si...@htf.highway.ne.jp>
> >Reply-To: "Tapestry development" <ta...@jakarta.apache.org>
> >To: "Tapestry development" <ta...@jakarta.apache.org>
> >Subject: Re: Suggest global Localization properties (Also UTF-8 properties files!)
> >Date: Wed, 31 Mar 2004 01:39:23 +0900
> >
> >Hi,
> >
> >I'm using *.properties + native2ascii for messages, now.
> >But, I don't like this combination, because \u unicode escape format's
> >very low readability.
> >
> >I want to use XML files for messages.
> >
> >My suggestion is based on the Java package hierarchy.
> >
> >1. <message-resource> position indicates message sharing level.
> > application, package (library ?), component
> >2. We can use the functionality of XML.
> > encoding, parameter entity, ...
> >3. Tapestry engine would search -
> > 1st - Page or Component FQCN
> > 2nd - upper level package
> > ...
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org