From: <yos...@us...> - 2008-12-08 22:16:58
|
> Please respond by Dec 22nd. > > Some people want to format numbers using Latin numbers and > separators in all locales, disregarding our native format data. > This proposes API to let them do that easily, without building a > custom DecimalFormatSymbols for all that locales that don't already use Latin. > > Doug > > com.ibm.icu.text.NumberFormat: > > /** > * Sets whether latin-1 digits and separators must be used. > * Setting to true causes '0' to be the digit base and latin decimal > * and grouping separators to be used (appropriate to the locale). > * Setting to false allows the default digit base, decimal, and grouping > * separators to be used (these might still be latin-1 if that is the > * default for the locale). > * @param useLatin true to force latin digits and separators. > * @draft ICU 4.2 > * @see #isForceLatin > */ > public void setForceLatin(boolean useLatin) > > /** > * Returns whether latin-1 digits and separators must be used. > * This does not report whether the digits and separators are > indeed latin-1, > * only whether they are forced to be. > * @return true if latin digits and separators are forced to be latin-1 > * @draft ICU 4.2 > * @see #setForceLatin > */ > public boolean isForceLatin() In CLDR, we're now discussing how to handle number types and we'll probably introduce number keywords in CLDR 1.7. In the current plan, my understanding is that keyword @number=latin (keyword and value are not final) lets number format service to use latin numbers. I prefer to support this requirement via the locale keyword instead of adding dedicated API proposed above. -Yoshito |