1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
5 [GenerateConversionToJS]
6 dictionary DisplayNameOptions {
10 sequence<DOMString> keys;
14 dictionary DisplayNameResult {
19 sequence<DOMString> values;
23 dictionary LocaleInfo {
29 * The IntlUtils interface provides helper functions for localization.
31 [LegacyNoInterfaceObject,
35 * Helper function to retrieve the localized values for a list of requested
38 * The function takes two arguments - locales which is a list of locale
39 * strings and options which is an object with four optional properties:
42 * an Array of string values to localize
45 * a String with a value "language", "region", "script", "currency",
46 * "weekday", "month", "quarter", "dayPeriod", or "dateTimeField"
49 * a String with a value "long", "abbreviated", "short", or "narrow"
52 * a String to select a specific calendar type, e.g. "gregory"
54 * It returns an object with properties:
57 * a negotiated locale string
69 * a list of translated values for the requested keys
73 DisplayNameResult getDisplayNames(sequence<DOMString> locales,
74 optional DisplayNameOptions options = {});
77 * Helper function to determine if the current application locale is RTL.
79 * The result of this function can be overriden by this pref:
80 * - `intl.l10n.pseudo`
82 boolean isAppLocaleRTL();