
Security News
Open Source Maintainers Feeling the Weight of the EU’s Cyber Resilience Act
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
nuxt-translation-manager
Advanced tools
Simple and easy to use translation manager for nuxt and nuxt-i18n that allows to manage translations from a single CSV file.
Simple and easy to use translation manager for nuxt
and nuxt-i18n
that allows to manage translations from a single CSV file.
Nuxt v4 Ready
✨
For Nuxt V4 example you can check this starter using Nuxt V4 && nuxt-i18n module
nuxt-translation-manager
dependency to your projectnpx nuxi@latest module add translation-manager
nuxt-translation-manager
dependency to your projectnpm install -D nuxt-translation-manager
pnpm install -D nuxt-translation-manager
yarn add -D nuxt-translation-manager
nuxt-translation-manager
to the modules
section of nuxt.config.ts
export default defineNuxtConfig({
modules: ['nuxt-translation-manager']
})
That's it! You can now use Nuxt Translation Manager in your Nuxt app ✨
Create translations.csv
file in your langDir
echo 'Key,"en-US","es-ES","ca-ES"
login,"Login","Acceder","Accedir"' > path-to-your-langDir/translations.csv
# replace `path-to-your-langDir`
This will generate a CSV file that looks like this:
Key | en-US | fr | de |
---|---|---|---|
hello | Hello | Bonjour | Hallo |
goodbye | Goodbye | Au revoir | Auf Wiedersehen |
thanks | Thanks | Merci | Danke |
Be sure to use the format lang-code
in the header row e.g. es-ES
Be sure to set the appropriate delimiter in your csv editor (comma by default) ,
You can use comments in your csv file using #
✨ Tip: you can use Edit CSV Extension for VSCode to manage your csv file inside of vscode
Key,"English, en-US","French, fr","German, de"
hello,"Hello","Bonjour","Hallo"
goodbye,"Goodbye","Au revoir","Auf Wiedersehen"
thanks,"Thanks","Merci","Danke"
# COMMENTS TEST
comment-test,"Comment test","Test comentario","Test comentari"
### MULTILINE COMMENT ###
### ANOTHER COMMENT ####
comment-multi,"Comment test","Test comentario","Test comentari"
// config key
export default defineNuxtConfig({
'translation-manager': {}
})
interface ModuleOptions {
/**
* nuxt-i18n lang dir
*
* @default 'locales'
*/
langDir?: string
/**
* csv file name without .csv file extension
*
* @default 'translations'
*/
translationFileName?: string
/**
* where to store json files
*
* @default 'langDir'
*/
outputDir?: string
/**
* csv separator character
*
* @default ','
*/
separator?: string
}
# Install dependencies
pnpm install
# Generate type stubs
pnpm run dev:prepare
# Develop with the playground
pnpm run dev
# Build the playground
pnpm run dev:build
# Run ESLint
pnpm run lint
# Run Vitest
pnpm run test
pnpm run test:watch
# Release new version
pnpm run release
Inspired by Quasalang CLI by Danny Connell
v1.1.1
FAQs
Simple and easy to use translation manager for nuxt and nuxt-i18n that allows to manage translations from a single CSV file.
We found that nuxt-translation-manager demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 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
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.