diff --git a/app/app.js b/app/app.js index 8e95cbd..c4a7a17 100644 --- a/app/app.js +++ b/app/app.js @@ -1,14 +1,30 @@ import Vue from 'vue'; +import i18n from 'vue-i18n'; +import Header from './components/header.vue'; +import Headlines from './components/headlines.vue'; +import Jumbotron from './components/jumbotron.vue'; import PasswordGenerator from './components/password-generator.vue'; import BootstrapHr from './components/bootstrap-hr.vue'; -import LesspassFeatures from './components/lesspass-features.vue'; +import Features from './components/features.vue'; import Footer from './components/footer.vue'; +import locales from './locales/locales'; + +var browserLanguage = (navigator.language || navigator.browserLanguage).split('-')[0]; +var lang = browserLanguage in locales ? browserLanguage : 'en'; + +Vue.use(i18n, { + lang: lang, + locales: locales +}); new Vue({ el: 'body', components: { + lesspassHeader: Header, + lesspassHeadlines: Headlines, + lesspassJumbotron: Jumbotron, passwordGenerator: PasswordGenerator, - lesspassFeatures: LesspassFeatures, + lesspassFeatures: Features, lesspassFooter: Footer, bootstrapHr: BootstrapHr } diff --git a/app/components/lesspass-features.vue b/app/components/features.vue similarity index 62% rename from app/components/lesspass-features.vue rename to app/components/features.vue index 29556e7..ef03bec 100644 --- a/app/components/lesspass-features.vue +++ b/app/components/features.vue @@ -25,16 +25,15 @@