Pappel Localization and format conversion tooling
A revival of the Babel tower, for your apps.
Please, tell us about your experience with the library on Twitter @pappel_io
npm install pappel -g
Remove the -g
if you do not plan on using the CLI
pappel --input <path> --output-format <output-format> [--v] [--w] [--input-format <input-format>] [--lang <lang>] [--output-dir <path>] [--output-file <filename.ext>]
- input - [source file path]
- output-format - (pappel|android|ios|xliff|react-native-localization)
- [input-format] - (xlsx|android|ios|xliff)
- [lang=''] - [2 letter ISO code]
- [output-dir='.'] - [output direction path]
- [output-file] - [name of the output file with extension]
- [v] - Version of Pappel
- [w] - Watch your file
pappel --input strings.xml --output-format ios
pappel --input Localizable.strings --output-format android
pappel --input spreadsheet.xlsx --output-format react-native-localization
pappel --input translation.xliff --output-format android
Please, tell us about your experience with the library on Twitter @pappel_io
var Pappel = require('pappel');
var importer = new Pappel.Importer.AndroidXML();
var xmlString = fs.readFileSync('./strings.xml', 'utf8');
var pappelFormat = importer.convert({
input : xmlString
});
var exporter = new Pappel.Exporter.Strings();
var content = exporter.convert({
input: pappelFormat
});
var fileContent = exporter.wrapContent({
content : content
});
fs.writeFileSync('./Localizable.strings', fileContent, 'utf8');
More in the API docs
Please, tell us about your experience with the library on Twitter @pappel_io
-
Revamped API
-
Add the "v" flag
-
Watcher option ("w" flag)
-
XLIFF (v2.0) converters
- XLIFF (v1.2) converters
- CLI: Only the parameters [input] & [output-format] become required
- AndroidXML & iOS importer language default to 'en'
- Improved doc
- Fix the CLI path
- AndroidXML2Pappel
- Strings2Pappel
- XLSX2Pappel
- Pappel2AndroidXML
- Pappel2Strings
- Pappel2ReactNativeLocalization
- Add XLIFF2 converter
- Add SRT converter
- Add VTT converter
- Add PHP Array converter