Skip to content

pgmsolutions/excel2lang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

excel2lang

excel2lang is a small utility program which takes a xlsx file as an input and extracts the languages strings to a JSON format. It has several cool features:

  • Support comment lines
  • Can create multiple files
  • Use the first column as default if no value

Installation

npm install -g excel2lang

Usage

excel2lang input.xlsx

xlsx format

Your excel must be like this:

# Unique ID English French
C id en fr
F ./{lang}.json
# Generic
open Open Ouvrir
browse Browse Parcourir
edit Edit Modifier
select Select Selectionner
F ./topbar/{lang}.json
# Topbar
topbar/file File Fichier
topbar/help Help Aide

The first column indicates what the line is for:

Character Description
nothing Regular line of strings.
C Code line, indicating the language code for each column.
F The JSON file to create. Will include all lines until the end of the file or another F line. The {lang} substring will be replace by the current language code.
# Comment line.

In order to work, a C line MUST be the first line of the excel sheet (beside comment line). Also, a F line MUST be present before the first string line.

TODO

  • More checks for errors

About

Turns Excel i18n files into a JSON format

Resources

License

Stars

Watchers

Forks

Packages

No packages published