They shouldn't worry about what the default language is, that's my job.  My
application is set up with English and French translations (since it's
targeted at Canada).  But if someone from China comes to my site, I don't
want it to blow up and display nothing, it should default to some language,
in my case, I've chosen to put the English text in my default
application.properties, which should make that the default language of the
site.  Unfortunately JSTL has decided they knew better than I (or they were
trying to save me from myself, or whatever) by making sure that I can't have
a default language on my site without doing extra work, I don't consider
that a benefit?  I still don't see the logic in their decision?
 (*Chris*)

On 11/9/06, Christopher Schultz <[EMAIL PROTECTED]> wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Chris,

Chris Pratt wrote:
> Woa, that didn't work.

I didn't really expect it to... I would have expected you to get a bunch
of blank messages (since application_en.properties had nothing in it). I
don't think that resource bundles "chain" or anything like that.

> According to a comment in the JSTL code, the Java developers don't
> know what their doing and the JSTL guys decided that the whole idea
> of a default resource bundle is non-portable.

It's completely portable. What they really mean is that it's not really
that great of an idea, since there's no indication of what locale the
"default bundle" actually is. I think it's a necessity, since there's
always someone who uses a language you've never heard of and so you have
to display /something/. It may as well be the native language of the
development team ;)

> Not sure why, but that means that in order for this to work properly
> in both Struts and JSTL I have to maintain identical
> application.properties and application_en.properties files.

I recommend the symlink approach. If you use ant for deployment, I think
you can do this on the disk. Or, you could also just copy
application.properties to application_en.properties before WARing your
webapp. That's what I'd do.

No need to maintain more than one copy of the same file in your source
repo... have your build process take care of that.

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFU8Wy9CaO5/Lv0PARAi/ZAJ9YIOGmZNXNrfOc6EVFsa/6V15ScgCgmGS3
4KqTSObdfg2+C+JOyr+qBbM=
=c49X
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to