🚨 Active Supply Chain Attack:node-ipc Package Compromised.Learn More
Socket
Book a DemoSign in
Socket

@huntersofbook/i18n

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@huntersofbook/i18n

It's basically a tool that takes a template with translation keys and syncs them to the given language. You can directly connect the outputs to the i18n libraries you use.

latest
Source
npmnpm
Version
0.8.1
Version published
Maintainers
1
Created
Source

alt text

i18n

Create i18n templates and automatically export them to your desired languages. Unplugin support.

It's basically a tool that takes a template with translation keys and syncs them to the given language. You can directly connect the outputs to the i18n libraries you use.

Version Downloads License Github Stars Discord

Installation

pnpm add -D @huntersofbook/i18n

It will be the .i18n folder. Save there by adding en.json, tr.json. It will automatically create a language folder for you and import your data there.

Youtube Setup Video

Youtube

Usage

Vite

import i18n from '@huntersofbook/i18n/vite'

export default defineConfig({
  plugins: [
    i18n({
      languages: ['tr', 'en', 'cn'],
    }),
  ],
})

Nuxt 3

export default defineNuxtConfig({
  modules: [
    '@huntersofbook/i18n/nuxt',
  ],
  huntersofbookI18n: {
    languages: ['tr', 'en', 'cn'],
  },
})

Documentation

Documentation of the project is available at https://opensource.huntersofbook.com/global/i18n.

alt text

Support

Join our Discord channel or open an issue.

Configuration

NameTypeDefaultDescription
languagesstring[]['tr', 'en', 'cn']Languages extensions to export
templateDirstring'.i18n'Template folder
exportDirstring'language'Template export folder
... soon more detail

💻 Development

Node version >= 18 Pnpm version >= 7

  • Clone this repository
  • Open the project folder packages/i18n
  • Enable Corepack using corepack enable (use npm i -g corepack for Node.js < 16.10)
  • Install dependencies using pnpm install
  • Go to i18n/packages pnpm dev or pnpm build
  • Go to i18n/playground pnpm dev
  • or packages/i18n in dev:package | dev:playground-vite used.

Thank you

Thanks to @antfu, this project is heavily inspired by unplugin-vue-components.

Sponsors

sponsors

License

MIT License © 2023-PRESENT productdevbook

Keywords

unplugin

FAQs

Package last updated on 24 May 2023

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