Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Mar 31, 2024 via pnpm

vue-i18n 9.4.1

Internationalization plugin for Vue.js
Package summary
Share
0
issues
4
licenses
26
MIT
1
BSD-2-Clause
1
ISC
1
BSD-3-Clause
Package created
4 May 2014
Version published
14 Sep 2023
Maintainers
1
Total deps
29
Direct deps
4
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
26 Packages, Including:
@babel/helper-string-parser@7.24.1
@babel/helper-validator-identifier@7.22.20
@babel/parser@7.24.1
@babel/types@7.24.0
@intlify/core-base@9.4.1
@intlify/message-compiler@9.4.1
@intlify/shared@9.4.1
@jridgewell/sourcemap-codec@1.4.15
@vue/compiler-core@3.4.21
@vue/compiler-dom@3.4.21
@vue/compiler-sfc@3.4.21
@vue/compiler-ssr@3.4.21
@vue/devtools-api@6.6.1
@vue/reactivity@3.4.21
@vue/runtime-core@3.4.21
@vue/runtime-dom@3.4.21
@vue/server-renderer@3.4.21
@vue/shared@3.4.21
csstype@3.1.3
estree-walker@2.0.2
magic-string@0.30.8
nanoid@3.3.7
postcss@8.4.38
to-fast-properties@2.0.0
vue-i18n@9.4.1
vue@3.4.21

BSD 2-Clause "Simplified" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
entities@4.5.0

ISC License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
picocolors@1.0.0

BSD 3-Clause "New" or "Revised" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
use-trademark
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
source-map-js@1.2.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

4
All Dependencies CSV
ⓘ This is a list of vue-i18n 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
@intlify/core-base9.4.1111.06 kBMIT
prod
@intlify/shared9.4.16.85 kBMIT
prod
@vue/devtools-api6.6.132.48 kBMIT
prod
vue3.4.212.09 MBMIT
prod peer

Visualizations

Frequently Asked Questions

What does vue-i18n do?

Vue-i18n is an internationalization plugin for Vue.js. It is designed to ease the process of providing different languages for Vue.js applications, giving a superb experience to users around the world regardless of their language preferences.

How do you use vue-i18n?

To get started with using vue-i18n, you will have to install and import relevant dependencies. The exact file you will use depends on your setup. If you are working directly in the browser, you might use the vue-i18n(.runtime).global(.prod).js. If you are using native ES modules, you may prefer vue-i18n(.runtime).esm-browser(.prod).js. For those using a bundle like webpack, rollup, or parcel, vue-i18n(.runtime).esm-bundler.js is the appropriate choice. In a Node.js environment, either vue-i18n.cjs(.prod).js or vue-i18n(.runtime).node.mjs should be used.

For a quick setup, let's assume you are using a bundler like webpack:

  1. Install vue-i18n:
npm install vue-i18n@next
  1. Then you'll need to create an i18n instance and mount it on the Vue instance:
import { createApp } from 'vue'
import { createI18n } from 'vue-i18n'

const i18n = createI18n({
  legacy: false,  // you must specify 'legacy: false' option
  locale: 'ja',
  fallbackLocale: 'en',
  messages: {
    en: {
      message: {
        hello: 'hello world'
      }
    },
    ja: {
      message: {
        hello: 'こんにちは、世界'
      }
    }
  }
})

const app = createApp({})

app.use(i18n)
  1. At this point, you can use this in the template:
<template>
  <p>{{ $t('message.hello') }}</p>
</template>

In this setup, we have English as the fallback language, Japanese as the default language, and the messages that we want to translate.

Where are the vue-i18n docs?

Vue-i18n has comprehensive documentation available for developers. The documentation is located on the Vue.js internationalization plugin repository on GitHub. You can find it directly at: https://github.com/intlify/vue-i18n-next/. Traverse through the repository to find all the information you need, including installation setup, examples, and solutions to common issues.