Skip to content

Commit

Permalink
Get locale domains from store if present
Browse files Browse the repository at this point in the history
  • Loading branch information
tyom committed Aug 23, 2018
1 parent 120d091 commit 0226b07
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/plugins/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ export default async ({ app, route, store, req }) => {
app.i18n.beforeLanguageSwitch = <%= options.beforeLanguageSwitch %>
app.i18n.onLanguageSwitched = <%= options.onLanguageSwitched %>

if (store && store.state.localeDomains) {
app.i18n.locales.forEach(locale => {
locale.domain = store.state.localeDomains[locale.code];
})
}

let locale = app.i18n.defaultLocale || null

if (app.i18n.differentDomains) {
Expand Down

0 comments on commit 0226b07

Please sign in to comment.