문제

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?

도움이 되었습니까?

해결책

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
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top