server/bo_client/app/instance-initializers/i18n.js
author nowmad@23.1.168.192.in-addr.arpa
Tue, 19 Jan 2016 19:06:17 +0100
changeset 86 15ded106ef1a
parent 28 b0b56e0f8c7f
permissions -rw-r--r--
add a player component to handle sound play/pause

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';
}