Re: Rest-API the request always sets the locale to "en"

2022-04-08 Thread Michael Brohl

Hi Rishi,

that's a good point, I think this is not handled yet and would be a good 
addition.


Please file a subtask ticket under 
https://issues.apache.org/jira/browse/OFBIZ-11328


Thanks,

Michael Brohl

ecomify GmbH - www.ecomify.de


Am 08.04.22 um 16:01 schrieb Rishi Agr:

Hi,
I am trying to send the REST request by setting the language to "de"
(Setting "accept-language: de" in request header). When the request arrives
to the "execute" method of "ServiceRequestHandler" class, the service
context is created and "userLogin" is added to the context. But I do not
see any code snippet that sets "locale" which causes the locale to be set
by default to "en". In my understanding, there should be a code included
just below the line that sets "userLogin"

serviceContext.put("locale", getHttpRequest().getLocale());

Please let me know if I am thinking in the right way or if there is a
different mechanism to send "locale" in the request header.
Thank you, Rishi



Rest-API the request always sets the locale to "en"

2022-04-08 Thread Rishi Agr
Hi,
I am trying to send the REST request by setting the language to "de"
(Setting "accept-language: de" in request header). When the request arrives
to the "execute" method of "ServiceRequestHandler" class, the service
context is created and "userLogin" is added to the context. But I do not
see any code snippet that sets "locale" which causes the locale to be set
by default to "en". In my understanding, there should be a code included
just below the line that sets "userLogin"

serviceContext.put("locale", getHttpRequest().getLocale());

Please let me know if I am thinking in the right way or if there is a
different mechanism to send "locale" in the request header.
Thank you, Rishi