Intlayer is an innovative Content Management System (CMS) designed specifically for JavaScript developers. It enables seamless transpilation of JavaScript content into structured dictionaries, making integration into your codebase straightforward and efficient.
- 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 the necessary packages using npm:
npm install intlayer-cli
yarn install intlayer-cli
pnpm install intlayer-cli
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
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.
To build your dictionaries, you can run the commands:
npx intlayer transpile
or in watch mode
npx intlayer watch
"scripts": {
"transpile": "npx intlayer transpile",
"transpile:watch": "npx intlayer watch"
}