Closed tcurdt closed 3 years ago
Hey Torsten,
i18n will be set to 'fr' when no headers or query parameters are passed with the request, but languageCode/language on request object will still be undefined. The plugin does not change those parameters. If you want to set the language code via query parameter you need to activate queryParameter: 'lang'
and send the language code with the request:
curl localhost/some-page?lang=en
I hope this answers your question.
Cheers, Kay
Thanks, @kaywolter. I still find the README a little misguiding - but things start to make more sense.
According to your response I guess I should be able to get the i18n locale via request.i18n
?
Yes, if everything is correct then i18n will be attached to request object.
I was trying with
From the docs I was under the impression that
language
below should default tofr
if no headers and no query parameter are provided:But it's just undefined. The language is set directly on the request though
...but I don't see how to change the language via query parameter.
What am I missing?