Skip to content

Creating Locales

Brian Chavez edited this page Jul 13, 2015 · 24 revisions

Locales are simple .js JavaScript files. Bogus is using a direct copy of locales from faker.js, so keeping up with the format original node.js format is necessary for compatibility between both projects. Ideally, we'd like to keep both faker.js and Bogus locales in sync so both projects can benefit from the community locale contributions.

Submit your Locale to faker.js master

First, go to the main faker.js and push your new locale.

Second, when your pull request is accepted, add an issue to Bogus and we'll update our faker.js locales to use the latest locale data set.

Also one last important reminder ...

If you're updating a locale be sure to add items at the end of an array not the beginning of an array. Adding items at the beginning of an array might break some unit tests based on our seeded test value. Ideally, please run all unit tests before submitting a pull request for maximum acceptance awesomeness.

Clone this wiki locally