ln3scan

0.0.4 • Public • Published

ln3scan

MIT

Utility for ln3 - custom, simple, extendable internationalization module for JavaScript applications

Introduction

ln3scan is an utility for automatic grabbing strings for ln3-based translation from JavaScript projects and making them available for translation in the form of JSON files

Installation

From the root of your project:

npm install ln3scan

To make it available from any place:

npm install -g ln3scan

Usage

ln3scan [directory] [--output translations_directory] [--file translation_module_name]

This will generate a translation module ( "ln3setup.js" is the default name) ready to be used in your project together with ln3 package in one of your project file (it is advised to put it into the module that loads earlier than others):

import ln3 from 'ln3';
import "./ln3/ln3setup";

To add generation for a new language, simply put an empty file named as <Language_ID>.json into the output directory, it will be filled with the default strings prefixed with !! (double exclamation mark) after the scan

Package Sidebar

Install

npm i ln3scan

Weekly Downloads

0

Version

0.0.4

License

MIT

Last publish

Collaborators

  • stanurkov