server/bo_client/app/instance-initializers/i18n.js
author ymh <ymh.work@gmail.com>
Tue, 31 Jan 2017 19:05:12 +0100
changeset 491 e9e436a588b2
parent 28 b0b56e0f8c7f
permissions -rw-r--r--
Install corrections

export default {
  name: 'i18n',
  initialize: function( instance ) {
    instance.lookup('service:i18n').set('locale', calculateLocale());
  }
};

function calculateLocale() {
  // whatever you do to pick a locale for the user:
  return navigator.language || navigator.userLanguage || 'fr-FR';
}