Skip to content

Automatically generates Chrome Extension's _locales JSON files from one CSV file.

Notifications You must be signed in to change notification settings

PlayerYK/Chrome-Extension-i18n-tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chrome Extension i18n tool

Automatically generates Chrome Extension's _locales JSON files from one CSV file.

Starting from column 3 in the CSV file, the values in each column will be output to the corresponding messages.json.

LocaleCode LanguageRegion appName appDesc
en English my app my app desc
en_US English (USA) my app en_US my app desc en_US
en_GB English (Great Britain) my app en_GB my app desc en_GB

The above structure in locale.sample.csv will generate the following content in ./locales_sample/<LocaleCode>/message.json.

{
  "appName": {
    "message": "my app"
  },
  "appDesc": {
    "message": "my app desc"
  }
}

Usage

1. Edit locale.csv

Do not to change the contents of the first two columns.

3. Generate the locale files

# install dependencies
npm install

# build locale file
npm run build

About

Automatically generates Chrome Extension's _locales JSON files from one CSV file.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published