> Please make sure your lift-core_zh_CN.properties was saved as UTF-8
Unless, lift does it's own property loading, property files need to be
in ISO-8859:
"When saving properties to a stream or loading them from a stream, the
ISO 8859-1 character encoding is used. For characters that cannot be
directly represented in this encoding, Unicode escapes are used;
however, only a single 'u' character is allowed in an escape
sequence. The native2ascii tool can be used to convert property files to
and from other character encodings."
http://java.sun.com/j2se/1.4.2/docs/api/java/util/Properties.html
/Jeppe
> You should always be working with UTF-8 files for properties /
> localisation - I think the encoding reported by jetty is something
> different (that it reads from the system)... ensure your props files
> are UTF-8 and go from there.
Careful now :-) Property files that are to be read by java's Properties
class should be in iso-8859-1 encoding and converted with native2ascii.
http://java.sun.com/javase/6/docs/api/java/util/Properties.html#load%28java.io.InputStream%29
XML property files can be in UTF-8 though....
/Jeppe
I would urge you to re-read my article -in it you'll see how I take a
note of the requested locale, and then hold that in a cookie for later
reference or use on a future visit. Study the locale calculator
carefully - there has been a breaking API change since it was written,
but with a slight modification it will work fine.
Moreover, ISO country codes are in the format en_US, not en_us... Lift
is leveraging some base java localization and you have to stick to the
rules :-)
I'll try to reply in more detail later.
Cheers, Tim
Sent from my iPhone