browser-addons

HttpServletRequest getLocale returns OS locale not browser locale

守給你的承諾、 提交于 2019-12-01 06:06:50
问题 I am using vaadin framework and in my application I have: @Override public void onRequestStart(HttpServletRequest request, HttpServletResponse response) { currentIP = request.getRemoteAddr(); setLocale(request.getLocale()); handle.set(this); this.request = request; this.response = response; } however, request.getLocale() returns en_US , which is my OS locale. However, in Firefox addon for switching locales (https://addons.mozilla.org/cs/firefox/addon/quick-locale-switcher/?src=userprofile), I