Faker generate english sentences in ruby on rails
-
20-06-2021 - |
Frage
While using Faker with rails, it generates sentences in some other language. I want them to be generated in English. What kind of settings do I need to change to do it?
Lösung
Docs say
Just set Faker::Config.locale to the locale you want, and Faker will take care of the rest.
https://github.com/stympy/faker/blob/master/README.md
https://github.com/stympy/faker/tree/master/lib/locales
Faker::Config.locale = :en
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow