Node.js module for processing utf-16 ios/osx .strings files.
npm install strings-file#node-strings-file
Node.js module for processing utf-16 ios/osx .strings files.
$ npm install strings-file
var data = StringsFile.readStringsSync('Localizable.strings', true);
console.log(data);
var data = {
'key_0': 'value_0',
'key_1': 'value_1'
};
StringsFile.writeStrings('Localizable.strings', data, function(err){
if(!err){
console.log('File written');
}
});
// A string in the .strings file format
var input = '"key" = "value";'
var data = StringsFile.parse(input, false);
var data = {
'key_0': 'value_0',
'key_1': 'value_1'
};
var str = StringsFile.compile(data);
data = {
'key_0': { 'value' : 'value_0', 'comment' : 'comment_0' },
'key_1': { 'value' : 'value_1', 'comment' : 'comment_1' }
};
var str = StringsFile.compile(data);