title: Nuxt: i18n.localePath access in middleware
body: <p>I've defined a namespaced middleware for Nuxt like so:</p>
  <pre><code>export default function({ store, redirect, app }){
      if (!store.state.isAuth) {
          return redirect(app.i18n.localePath('/auth'))
      }
  }
  </code></pre>
  <p>where if the user is <em>not</em> authenticated, they're redirected to the authentication page, located at <code>/auth</code>. However, this is a multilingual site, so I need to generate the path corresponding to the current locale. Normally I'd do this using <code>$i18n.localePath</code> or in this case, using Nuxt's <a href="https://nuxtjs.org/docs/2.x/concepts/context-helpers/" rel="nofollow noreferrer">context</a>, <code>app.i18n.localePath()</code>, however I get this error:</p>
  <pre><code> app.i18n.localePath is not a function 
  </code></pre>
  <p>and I'm not sure why, given that there's a context, and <code>console.log(app.i18n)</code> shows me that app.i18n.localePath <em>is</em> a function:</p>
  <pre><code>...
  localePath: [Function: bound ],
  ...
  </code></pre>
  <p>Any suggestions? Thanks!</p>