aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Readme.md2
-rw-r--r--lib/index.js4
2 files changed, 6 insertions, 0 deletions
diff --git a/Readme.md b/Readme.md
index a0fbc0d7..2077c5a1 100644
--- a/Readme.md
+++ b/Readme.md
@@ -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;