Skip to content

v2.1.3

Choose a tag to compare

@arm1n arm1n released this 11 Oct 15:16
· 138 commits to master since this release
  • Improves the detectLocale function to better take sub-locales into account. This is necessary when dealing with e.g. Chinese, where zh_HK is a different language from zh_CN. Now, it will compare the list from window.navigator.languages (which returns something like ['de-AT', 'de', 'en']) with the list of allowed locales, and tries to pick the best one.
  • The service also exposes this functionality in a new function guessBrowserLocale().