How do I get accept-language header in Angular +2? I'm using JIT and would like to load given language accordingly.
I have tried to get locale on bootstrap with:
const translations = require(`raw-loader!./locale/messages.${(window.clientInformation && window.clientInformation.language) || window.navigator.languages[1] || ''}.xlf`);
And it works to some degree, but dosen't take every browser into account. Any help is appreciated.