Skip to content

Extract all the texts of any project with HTML files and generate a KV (Key-Value) file, key = reference key, value = extracted text.

License

Notifications You must be signed in to change notification settings

juliandavidmr/text2locale

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

text2locale

Extract all the texts of any project with HTML files and generate a KV (Key-Value) file, key = reference key, value = extracted text.

Install

npm install -g github:juliandavidmr/text2locale

Usage

$ text2locale input "./example/src" -o "./example/locale/" -l en -t es,de,zh

More command info: $ text2locale input --help

API

input command options

Option Description Default
-l, --lang Language of the texts to be extracted. en
-o, --output Output directory. ./
-s, --separator Separator to generate the key names. _
-t, --templates Generate template for other languages. en,es

Whats Next?

The generated files can be manipulated by the i18n-editor website, you can add/remove/edit all translation resources from multiple JSON files at the time.

License

MIT

About

Extract all the texts of any project with HTML files and generate a KV (Key-Value) file, key = reference key, value = extracted text.

Topics

Resources

License

Stars

Watchers

Forks