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)

The best way to debug slow web pages cover image

The best way to debug slow web pages

Tools like Page Speed Insights and Google Lighthouse are great for providing advice for front end performance issues. But what these tools can’t do, is evaluate performance across your entire stack of distributed services and applications.

Watch video

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay