diff --git a/README.md b/README.md index 9b9a071f..84c77b2b 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ Download the package and use the `dist/fakerator.js` or the `dist/fakerator.min. @@ -53,6 +53,22 @@ var name = fakerator.names.name(); // Result: 'Dr. Marcus Drechsler' ``` +Shortly +```js +var fakerator = require("fakerator")("hu-HU"); +var name = fakerator.names.name(); +// Result: 'Fülöp Magdolna' +``` + +Or load a specific locale + +```js +var fakerator = require("fakerator/locales/de-DE")(); +var name = fakerator.names.name(); +// Result: 'Dr. Marcus Drechsler' +``` + + ## Seeding The library uses the [Mersenne Twister](http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html) random number generator, so you can set seed value. ```js @@ -106,6 +122,16 @@ The library supports localizations. You can set the locale code in constructor. // Альберт Валентинович Архипов ``` +In production, you can load only a specific locale: + +```js + // Use french + var fakeratorFR = require("fakerator/locales/fr-FR")(); + console.log(fakeratorFR.names.name()); + // Dufour Camille +``` + + ### Available localizations: Code | Language/Country | Usage | Creator/Source --------- | --------------------- | ------------------------- | --------------