@i18n-micro/node
@i18n-micro/node
Node.js runtime for nuxt-i18n-micro — filesystem translation loading on top of @i18n-micro/runtime. Use this in Node.js applications, CLI tools, or backend services.
For browser / vanilla JS without fs, use @i18n-micro/runtime directly.
Installation
pnpm add @i18n-micro/node
# or
npm install @i18n-micro/node
# or
yarn add @i18n-micro/node
Quick Start
import { createI18n } from '@i18n-micro/node'
// 1. Create I18n instance
const i18n = createI18n({
locale: 'en',
fallbackLocale: 'en',
translationDir: './locales', // Path to your locales directory
disablePageLocales: false, // If true, ignores pages/ folder and treats all files as global translations
})
// 2. Load translations from directory (recursive, supports pages structure)
await i18n.loadTranslations()
// 3. Use translations
console.log(i18n.t('greeting', { name: 'John' })) // "Hello, John!"
console.log(i18n.tc('apples', 5)) // "5 apples"
Resources
- Repository: https://github.com/s00d/nuxt-i18n-micro
- Documentation: https://s00d.github.io/nuxt-i18n-micro/
License
MIT
Related Packages
@i18n-micro/hmr
Translation HMR utilities for Nuxt I18n Micro (granular subpath imports).
51,795
251
@i18n-micro/core
Core utilities for translations, formatting, and locale routing in Nuxt I18n Mic...
199,259
251
@blax-software/i18n
Per-page, all-locale translation sources merged into vue-i18n messages, plus a C...
253
0
Version History
| Version | Released | License |
|---|---|---|
| 1.2.21 | MIT | |
| 1.2.20 | MIT | |
| 1.2.19 | MIT | |
| 1.2.18 | MIT | |
| 1.2.17 | MIT | |
| 1.2.16 | MIT | |
| 1.2.15 | MIT | |
| 1.2.14 | MIT | |
| 1.2.9 | MIT | |
| 1.2.8 | MIT | |
| 1.2.7 | MIT | |
| 1.2.6 | MIT | |
| 1.2.5 | MIT | |
| 1.2.4 | MIT | |
| 1.2.3 | MIT | |
| 1.2.2 | MIT | |
| 1.2.1 | MIT | |
| 1.2.0 | ||
| 1.1.1 | ||
| 1.1.0 | ||
| 1.0.1 | ||
| 1.0.0 |