tango.text.locale.Locale

License:

BSD style: see license.txt

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:
1
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 : Layout!(char) [public]
Locale-enabled wrapper around tango.text.convert.Layout
this(IFormatService formatService = null)
char[] unknown(char[] output, const(char)[] format, const(TypeInfo) type, Arg p) [protected, override]
char[] integer(char[] output, long v, const(char)[] alt, ulong mask = ulong.max, const(char)[] format = null) [protected, override]
char[] floater(char[] output, real v, const(char)[] format) [protected, override]