How to use the iso-639-1/build/index.getNativeName function in iso-639-1

To help you get started, we’ve selected a few iso-639-1 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 vuetifyjs / vuetify / packages / docs / src / components / doc / Locales.vue View on Github external
const array = Object.keys(locales).map(localeCode => ({
          localeCode,
          localeName: ISO6391.getName(localeCode.substr(0, 2)),
          localeNativeName: localeCode === 'en' ? '' : ISO6391.getNativeName(localeCode.substr(0, 2)),
        }))
        array.sort((a, b) => (a.localeCode < b.localeCode ? -1 : (a.localeCode > b.localeCode ? 1 : 0)))