📦 @breadstone-tools/localizator-app
CLI and programmatic entrypoint for the Localizator toolchain.
Extract, analyze, transform, and generate translation resources for multiple frameworks and formats.
📁 Project Structure
Part of the monorepo mosaik
Package path: tools/localizator/app
Version: see npm
License: MIT
📦 Installation
yarn add @breadstone-tools/localizator-app
npm install @breadstone-tools/localizator-app
🔧 Usage
CLI
npx localizator <command> [options]
See npx localizator --help for all options.
Programmatic API
import { run, type IRunConfig } from '@breadstone-tools/localizator-app';
const config: IRunConfig = {
cwd: process.cwd(),
output: './locales',
detect: {
root: './src',
preset: 'angular',
type: 'json'
},
generate: {
enabled: true,
apiKey: process.env.GEMINI_API_KEY,
locales: ['de', 'fr'],
baseLocale: 'en'
}
};
run(config).then(result => {
console.log(result.generate);
});
⚙️ Features
- CLI for extraction, analysis, transformation, and AI-based generation of localization resources
- Programmatic API for integration into CI/CD or custom tools
- Supports Angular, React, Vue, Lit, Stencil, and more
🛠 Recommendations
- Use as the main entrypoint for localization workflows in Nx monorepos.
- Integrate with CI/CD pipelines for automated i18n management.
📦 Publishing
yarn nx run localizator-app:publish
📄 License
MIT © Breadstone