Bumping manifests a=b2g-bump
[gecko.git] / intl / locale / nsILocale.idl
blobe0449d777e07ba6df3432943b07ae8a4f456d53f
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include "nsISupports.idl"
8 %{C++
9 #define NSILOCALE_COLLATE "NSILOCALE_COLLATE"
10 #define NSILOCALE_CTYPE "NSILOCALE_CTYPE"
11 #define NSILOCALE_MONETARY "NSILOCALE_MONETARY"
12 #define NSILOCALE_NUMERIC "NSILOCALE_NUMERIC"
13 #define NSILOCALE_TIME "NSILOCALE_TIME"
14 #define NSILOCALE_MESSAGE "NSILOCALE_MESSAGES"
16 #define NS_LOCALE_CONTRACTID "@mozilla.org/intl/nslocale;1"
19 /**
20 * Represents one locale, which can be used for things like sorting text strings
21 * and formatting numbers, dates and times.
23 [scriptable, uuid(21035ee0-4556-11d3-91cd-00105aa3f7dc)]
24 interface nsILocale : nsISupports
26 /**
27 * Get the locale code for a given category.
29 * A locale code is of the form language[-COUNTRY[-region]], where
30 * "language" is an ISO 639 language code (two letter codes preferred over
31 * three letter codes when available), "COUNTRY" is an ISO 3166 two letter
32 * country code, and "region" is a string of up to 5 letters.
34 * A category is one of the following:
35 * NSILOCALE_CTYPE: Character classification and case conversion.
36 * NSILOCALE_COLLATE: Collation order. How strings are sorted.
37 * NSILOCALE_MONETARY: Monetary formatting.
38 * NSILOCALE_NUMERIC: Numeric, non-monetary formatting.
39 * NSILOCALE_TIME: Date and time formats.
40 * NSILOCALE_MESSAGES: Related to fonts, character encodings etc.
42 * @param category
43 * The category of interest.
44 * @return The locale code to be used for the given category.
46 AString getCategory(in AString category);