Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
nuxt-i18n
Advanced tools
i18n for your Nuxt project
yarn add nuxt-i18n # yarn
npm i nuxt-i18n # npm
Firstly, you need to add nuxt-i18n
to your Nuxt config.
// nuxt.config.js
{
modules: [
[
'nuxt-i18n',
{
locales: ['en', 'es'],
defaultLocale: 'en',
vueI18n: {
fallbackLocale: 'en',
messages: {
en: {
greeting: 'Hello world!'
},
es: {
greeting: '¡Hola mundo!'
}
}
}
}
]
]
}
Then you can start using nuxt-i18n
in your Vue components!
<template>
<main>
<h1>{{ $t('greeting') }}</h1>
<nuxt-link
v-if="$i18n.locale !== 'en'"
:to="switchLocalePath('en')"
>
English
</nuxt-link>
<nuxt-link
v-if="$i18n.locale !== 'es'"
:to="switchLocalePath('es')"
>
Español
</nuxt-link>
</main>
</template>
If you would like to find out more about how to use nuxt-i18n
, check out the docs!
All contributions are welcome! If you would like to make some changes, follow these steps:
cd my-nuxt-project
mkdir modules
git clone git@github.com:<username>/nuxt-i18n.git modules/nuxt-i18n # ssh
git clone https://github.com/<username>/nuxt-i18n.git modules/nuxt-i18n # https
// nuxt.config.js
{
modules: [
['./modules/nuxt-i18n', {
// options...
}]
]
}
cd modules/nuxt-i18n/
yarn # yarn
npm i # npm
git checkout -b my-new-feature
yarn lint && yarn test # yarn
npm run lint && npm test # npm
git clone git@github.com:<username>/nuxt-i18n.git # ssh
git clone https://github.com/<username>/nuxt-i18n.git # https
cd nuxt-i18n
yarn # yarn
npm i # npm
git checkout -b my-new-feature
yarn docs:dev # yarn
npm run docs:dev # npm
docs/
directoryIf you're adding new pages, make sure you add them to the table of contents in
docs/.vuepress/config
If you have any questions or issues, check out Discord server.
MIT License - Copyright (c) Nuxt Community
FAQs
i18n for Nuxt
The npm package nuxt-i18n receives a total of 22,105 weekly downloads. As such, nuxt-i18n popularity was classified as popular.
We found that nuxt-i18n demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.