Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@kazupon/vue-i18n-loader

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kazupon/vue-i18n-loader

vue-i18n loader for custom blocks

  • 0.3.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7.3K
decreased by-7.71%
Maintainers
1
Weekly downloads
 
Created
Source

:globe_with_meridians: vue-i18n-loader

CircleCI codecov npm

vue-i18n loader for custom blocks

:cd: Installation

$ npm i --save-dev @kazupon/vue-i18n-loader

:rocket: Usage

the below example thatApp.vue have i18n custom block:

Custom Blocks (Single File Components)

<i18n>
{
  "en": {
    "hello": "hello world!"
  },
  "ja": {
    "hello": "こんにちは、世界!"
  }
}
</i18n>

<template>
  <p>{{ $t('hello') }}</p>
</template>

<script>
export default {
  name: 'app',
  // ...
}
</script>

JavaScript

import Vue from 'vue'
import VueI18n from 'vue-i18n'
import App from './App.vue'

Vue.use(VueI18n)

const i18n = new VueI18n({
  locale: 'en',
  messages: {
    en: {
      // ...
    },
    ja: {
      // ...
    }
  }
})
new Vue({
  i18n,
  render: h => h(App)
}).$mount('#app')

Webpack Config

configure webpack config for vue-loader (v11.3 later):

module.exports = {
  module: {
    rules: [{
      test: /\.vue$/,
      loader: 'vue',
      options: {
        loaders: {
          i18n: '@kazupon/vue-i18n-loader'
        }
      }
    }]
  }
}

:scroll: Changelog

Details changes for each release are documented in the CHANGELOG.md.

:muscle: Contribution

Please make sure to read the Contributing Guide before making a pull request.

MIT

Keywords

FAQs

Package last updated on 04 Mar 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc