DEV Community

Suhana
Suhana

Posted on

How to set the header's Accept-Language with locale value

I have a request header Accept-Language which can have "en" or "fr" locale. Now one application sends a header where header key will be locale. So, to be in the same pace i should set their locale value to Accept-Language. I cannot do it commonly in localeResolver method. It should be for partucular api so i need to do this in controller. How to achieve this?
Thanks in advance

Top comments (0)