How to use the cldr.extractFields function in cldr

To help you get started, we’ve selected a few cldr examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bobisjan / ember-format / lib / tasks / format-extract.js View on Github external
extractFields: function(locale) {
    return cldr.extractFields(locale);
  }
github ember-intl / ember-intl / lib / extract.js View on Github external
function extractFields(locale, fieldNames) {
    assert(isValidLocale(locale), 'Invalid locale');

    var fields = cldr.extractFields(normalize(locale));

    if (fieldNames) {
        fields = fieldNames.reduce(function (filteredFields, fieldName) {
            filteredFields[fieldName] = fields[fieldName];
            return filteredFields;
        }, {});
    }

    if (!Object.keys(fields).length) {
        return null;
    }

    return fields;
}
github bobisjan / ember-format / blueprints / locale / index.js View on Github external
extractFields: function(locale) {
    return cldr.extractFields(locale);
  },