Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

dev-idkwhoami's avatar

FakerPHP only uses specified locale on 'real' methods. Why?

Hello together,

im trying to generate a easy to remember 'token' using random words. Since the users will be german i wanted to use german words.

When I use fake('de_DE')->words(2, true) i get seomthing like eos doloribus but when i use fake('de_DE')->realText(10) i get something like Wenn man.

Now my question is why is it using the German Text provider ONLY for 'real' methods? And if there is a way how can i change that behavior ?

0 likes
1 reply
dev-idkwhoami's avatar
dev-idkwhoami
OP
Best Answer
Level 10

It seems i found why it ignores the locale for the Lorem provider.

As it turns out they have a static words list for that. Im not sure if this is intentional or just hasn't been thought of.

Either way I think that answers my questions.

May this help whoever encounters the same problem ^^

Please or to participate in this conversation.