Re: Using a polyglot compatibility section in a DVB-MHP program

From: David Gallardo (dgallardo@mediaone.net)
Date: Tue Aug 28 2001 - 15:24:51 EDT


You're right, ResourceBundle will let you store strings and other objects.
If it's just text he needs, PropertyResourceBundle is easiest to use. It
stores strings in text files, .properties files.

I would avoid using MessageFormat and ChoiceFormat, if possible, because
they make localization more difficult; it's best if you just have complete
strings to translate.

If you're suggesting that he use MessageFormat or ChoiceFormat to select
what punctuation character to use for a decimal point, the better choice is
to use NumberFormat, which will format any of the Java primitive numeric
types according to a locale's conventions.

Finally, there is a good book from O'Reilly, Java Internationalization, that
provides a good overview of internationalization issues and the Java
solution to them. Sun has a good tutorial on their site, which I think
they've recently updated. (A google search for "Java Internationalization
API" is probably the quickest way to get there.) No other Java book I've
seen has any useful internationalization information.

- David Gallardo

----- Original Message -----
From: Markus Scherer <markus.scherer@jtcsv.com>
To: William Overington <WOverington@ngo.globalnet.co.uk>
Cc: <unicode@unicode.org>; <archive@ngo.globalnet.co.uk>
Sent: Tuesday, August 28, 2001 12:51 PM
Subject: Re: Using a polyglot compatibility section in a DVB-MHP program

> You are on the right track:
>
> ResourceBundle's allow you to store strings and all kinds of objects
separate from the program code.
> Locale's are used to identify which resouce bundles (among other things)
to select, based on language and region/country, mostly.
> You will also need MessageFormat and ChoiceFormat.
>
> The Java documentation and a good library book about Java will give you
all you need. You do not need to develop anything new.
>
> Best regards,
> markus
>



This archive was generated by hypermail 2.1.2 : Tue Aug 28 2001 - 16:16:40 EDT