-
-
Notifications
You must be signed in to change notification settings - Fork 545
Creating Locales
Brian Chavez edited this page Jun 10, 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 is necessary for comparability 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.
You can edit or add locales in:
Source\Bogus\locales
When Bogus is compiled, these .js files are executed in a JavaScript VM and the result locale is converted to Json saved in Source\Bogus\data which is the basis for the Bogus dataset database.
The format of a locale should look like:
{ "de": { "title": "German", "address": { "city_prefix": [ "Nord", "Ost", "West", "Süd", "Neu", "Alt", "Bad" ],