intlayer-cli
TypeScript icon, indicating that this package has built-in type declarations

2.0.13 • Public • Published

Intlayer: Next-Level Content Management in JavaScript

Intlayer is an internationalization library designed specifically for JavaScript developers. It allow the declaration of your content everywhere in your code. It converts declaration of multilingual content into structured dictionaries to integrate easily in your code. Using TypeScript, Intlayer make your development stronger and more efficient.

Why Choose Intlayer?

  • JavaScript-Powered Content Management: Harness the flexibility of JavaScript to define and manage your content efficiently.
  • Type-Safe Environment: Leverage TypeScript to ensure all your content definitions are precise and error-free.
  • Integrated Content Files: Keep your translations close to their respective components, enhancing maintainability and clarity.
  • Simplified Setup: Get up and running quickly with minimal configuration, especially optimized for Next.js projects.
  • Server Component Support: Perfectly suited for Next.js server components, ensuring smooth server-side rendering.
  • Enhanced Routing: Full support for Next.js app routing, adapting seamlessly to complex application structures.

Install Package

Install the necessary packages using npm:

npm install intlayer-cli
yarn install intlayer-cli
pnpm install intlayer-cli

intlayer-cli package

intlayer-cli package intend to transpile your intlayer declarations into dictionaries.

This package will transpile all intlayer files, such as src/**/*.content.{ts|js|mjs|cjs|json}. See how to declare your Intlayer declaration files.

To interpret intlayer dictionaries you can interpreters, such as react-intlayer, or next-intlayer

Configuration File Support

Intlayer accepts multiple configuration file formats:

  • intlayer.config.ts
  • intlayer.config.js
  • intlayer.config.json
  • intlayer.config.cjs
  • intlayer.config.mjs
  • .intlayerrc

To see how to configure available locales, or other parameters, refer to the configuration documentation here.

Run intlayer commands

To build your dictionaries, you can run the commands:

npx intlayer transpile

or in watch mode

npx intlayer watch

Use intlayer commands in your package.json:

"scripts": {
  "transpile": "npx intlayer transpile",
  "transpile:watch": "npx intlayer watch"
}

Package Sidebar

Install

npm i intlayer-cli

Homepage

intlayer.org

Weekly Downloads

31

Version

2.0.13

License

Apache-2.0

Unpacked Size

18.6 kB

Total Files

9

Last publish

Collaborators

  • ay.pineau