icebob/fakerator

Wrong country code and name generated

connectashish91 opened this issue · 1 comments

Code
let Faker = require("fakerator"); let faker = Faker("en-AU"); console.log( faker.entity.address());

Output
{
country: 'Aruba',
countryCode: 'AW',
state: 'Victoria',
city: 'South Owen',
street: '3552 Joseph Branch Apt. 535',
zip: '6115',
geo: { latitude: 80.2022, longitude: 17.571499999999986 }
}

I have chosen to generate random data for Australia. When generating the address, only the state name is Australian.

The "en-AU" configures the localization of string and not the content. The country is always generated randomly, not depend on the selected localization. The name will be localized to the selected language.