title: Get current locale in a child component
body: <p>I don't manage to get the locale parameter from vue-i18n in my child component.</p>
  
  <p>I've installed vue-i18n in cli ui. The translation with $t("message") is working but I have error when i try to access to i18n.locale</p>
  
  <p>my enter point (main.js)</p>
  
  <pre><code>    import Vue from 'vue'
      import App from './App.vue'
      import router from './router'
      import i18n from './i18n'
  
      new Vue({
        router,
        i18n,
        render: h =&gt; h(App)
      }).$mount('#app')
  </code></pre>
  
  <p>my child component</p>
  
  <pre><code>&lt;template&gt;
      &lt;div&gt;{{ $t("message") }}&lt;/div&gt;
  &lt;/template&gt;
  &lt;script&gt;
  import {HTTP} from '@/http-common'
  
  export default 
  {
    name : 'c1',
    methods:{
        selectMap()
        {
            console.log(i18n.locale);//=&gt; doesn't work
        }
  }
  &lt;/script&gt;
  
  </code></pre>
  
  <p>i18n.js</p>
  
  <pre><code>import Vue from 'vue'
  import VueI18n from 'vue-i18n'
  
  Vue.use(VueI18n)
  
  function loadLocaleMessages () {
    const locales = require.context('./locales', true, /[A-Za-z0-9-_,\s]+\.json$/i)
    const messages = {}
    locales.keys().forEach(key =&gt; {
      const matched = key.match(/([A-Za-z0-9-_]+)\./i)
      if (matched &amp;&amp; matched.length &gt; 1) {
        const locale = matched[1]
        messages[locale] = locales(key)
      }
    })
    return messages
  }
  
  export default new VueI18n({
    locale: process.env.VUE_APP_I18N_LOCALE || 'en',
    fallbackLocale: process.env.VUE_APP_I18N_FALLBACK_LOCALE || 'en',
    messages: loadLocaleMessages()
  })
  
  </code></pre>