tango.text.locale.Locale

License:
BSD style:

Version:
Feb 2007: Initial release

author:
Kris

This is the Tango I18N gateway, which extends the basic Layout module with support for cuture- and region-specific formatting of numerics, date, time, and currency.

Use as a standalone formatter in the same manner as Layout, or combine with other entities such as Stdout. To enable a French Stdout, do the following:
Stdout.layout = new Locale (Culture.getCulture ("fr-FR"));


Note that Stdout is a shared entity, so every usage of it will be affected by the above example. For applications supporting multiple regions create multiple Locale instances instead, and cache them in an appropriate manner.

In addition to region-specific currency, date and time, Locale adds more sophisticated formatting option than Layout provides: numeric digit placement using '#' formatting, for example, is supported by Locale - along with placement of '$', '-', and '.' regional-specifics.

Locale is currently utf8 only. Support for both Utf16 and utf32 may be enabled at a later time

class Locale: tango.text.convert.Layout.Layout!(char).Layout;
Locale-enabled wrapper around tango.text.convert.Layout

this(IFormatService formatService = null);


protected char[] unknown(char[] output, const(char)[] format, const(TypeInfo) type, Arg p);


protected char[] integer(char[] output, long v, const(char)[] alt, ulong mask = (ulong).max, const(char)[] format = null);


protected char[] floater(char[] output, real v, const(char)[] format);



Page generated by Ddoc. Copyright (c) 2007 Kris. All rights reserved