Skip to content

Commit

Permalink
feat: make t() method available server-side through app.$t() (#168)
Browse files Browse the repository at this point in the history
  • Loading branch information
iliyaZelenko authored and paulgv committed Jan 14, 2019
1 parent 9ad540e commit 90bcd80
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/plugins/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ export default async ({ app, route, store, req }) => {
app.i18n.routesNameSeparator = '<%= options.routesNameSeparator %>'
app.i18n.beforeLanguageSwitch = <%= options.beforeLanguageSwitch %>
app.i18n.onLanguageSwitched = <%= options.onLanguageSwitched %>
// Extension of Vue
if (!app.$t) {
app.$t = app.i18n.t
}

// Inject seo function
Vue.prototype.$nuxtI18nSeo = nuxtI18nSeo
Expand Down

0 comments on commit 90bcd80

Please sign in to comment.