Locale translations = fContext.getViewRoot().getLocale();
Locale formatting = context.getFormattingLocale();
if (formatting == null)
formatting = translations;
MutableLocaleContext localeContext = new MutableLocaleContext(formatting,
translations);
localeContext.setReadingDirection(context.isRightToLeft() ?
LocaleUtils.DIRECTION_RIGHTTOLEFT :
LocaleUtils.DIRECTION_LEFTTORIGHT);
localeContext.setTimeZone(context.getTimeZone());
MutableDecimalFormatContext mdfc =
new MutableDecimalFormatContext(localeContext.getDecimalFormatContext());
char grouping = context.getNumberGroupingSeparator();
if (grouping != (char) 0)
mdfc.setGroupingSeparator(grouping);
char decimal = context.getDecimalSeparator();
if (decimal != (char) 0)
mdfc.setDecimalSeparator(decimal);
localeContext.setDecimalFormatContext(mdfc);
_localeContext = localeContext;
}