Localization

As of version v2.0.0 Faker has support for multiple localities.

The default language locale is set to English.

Setting a new locale is simple:

// sets locale to de
faker.setLocale('de');
// or
faker.locale = 'de';
LocaleName
af_ZAAfrikaans
arArabic
azAzerbaijani
czCzech
deGerman
de_ATGerman (Austria)
de_CHGerman (Switzerland)
elGreek
enEnglish
en_AUEnglish (Australia)
en_AU_ockerEnglish (Australia Ocker)
en_BORKEnglish (Bork)
en_CAEnglish (Canada)
en_GBEnglish (Great Britain)
en_GHEnglish (Ghana)
en_IEEnglish (Ireland)
en_INDEnglish (India)
en_NGNigeria (English)
en_USEnglish (United States)
en_ZAEnglish (South Africa)
esSpanish
es_MXSpanish (Mexico)
faFarsi
fiFinnish
frFrench
fr_BEFrançais (Belgique)
fr_CAFrench (Canada)
fr_CHFrench (Switzerland)
geGeorgian
heHebrew
hrHrvatski
huHungarian
hyArmenian
id_IDIndonesia
itItalian
jaJapanese
koKorean
lvLatvian
mkMacedonian
nb_NONorwegian
neNepalese
nlDutch
nl_BEDutch (Belgium)
plPolish
pt_BRPortuguese (Brazil)
pt_PTPortuguese (Portugal)
roRomanian
ruRussian
skSlovakian
svSwedish
trTurkish
ukUkrainian
urUrdu
viVietnamese
zh_CNChinese
zh_TWChinese (Taiwan)
zu_ZAZulu (South Africa)

Individual Localization Packages

As of version v3.0.0 Faker supports incremental loading of locales.

By default, requiring faker will include all locale data.

In a production environment, you may only want to include the locale data for a specific set of locales.

// loads only de locale
const faker = require('@faker-js/faker/locale/de');