Skip to content

This module creates _locales for Google Chrome's extensions and apps from a CSV file.

License

Notifications You must be signed in to change notification settings

drfisher/csv-locales

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

csv-locales

This module creates json files with i18n locales for Google Chrome extensions and applications from a CSV file.

Installation

npm install --save csv-locales

Usage

To create locales use a CSV file which generated from a spreadsheet with this structure.

You can use it as a grunt task or as a gulp task, or as in example below:

var csvLocales = require('csv-locales');

var params = {
  csvPath: 'path/to/the/file/locales.csv',
  dirPath: 'path/to/the/target/dir/_locales',
  csvParse: {/* CSV parser option or null */}
};

csvLocales(params, function (err) {
  if (err) {
    throw err;
  }
  
  // All done!
});

Params available

  • csvPath - a path to the CSV file with locales.
  • dirPath - a path to the target directory. If it doesn't exist, it will be created.
  • csvParse — a list of options for the CSV parser.

License

MIT

About

This module creates _locales for Google Chrome's extensions and apps from a CSV file.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published