0.2.0 • Published 3 years ago

dragomanjs v0.2.0

Weekly downloads
2
License
MIT
Repository
github
Last release
3 years ago

DragomanJS

drag·o·man: an interpreter or guide

Dragoman is a tool used to programmatically scrub your Symfony, Laravel, or Craft CMS templates and outputs all translatable strings into a CSV file. Dragoman also provides the ability to convert a CSV file into PHP and JSON files.

Installation

Install the package from NPM:

npm i -D dragomanjs

Create a dragoman.config.js config file:

module.exports = {
    syntax: "twig", // currently supports 'twig'
    lang: ["es-MX", "jp-JA", "ca-FR", "ko-KR"], // must be an array of strings
    content: "./templates", // can be an array of template directories
    output: "./translations",
};

Setup an NPM script to run the CLI:

"translate": "dragoman"

Run the NPM script:

npm run translate
0.2.0

3 years ago

0.1.0

4 years ago

0.0.1

4 years ago