diff options
| -rw-r--r-- | Readme.md | 2 | ||||
| -rw-r--r-- | lib/index.js | 4 |
2 files changed, 6 insertions, 0 deletions
@@ -241,6 +241,8 @@ Setting a new locale is simple: ```js // sets locale to de +faker.setLocale("de"); +// or faker.locale = "de"; ``` diff --git a/lib/index.js b/lib/index.js index c071c3fd..58f0012e 100644 --- a/lib/index.js +++ b/lib/index.js @@ -146,6 +146,10 @@ function Faker (opts) { }; +Faker.prototype.setLocale = function (locale) { + this.locale = locale; +} + Faker.prototype.seed = function(value) { var Random = require('./random'); this.seedValue = value; |
