Internationalization and localization tools


Locale-Sensitive JavaScript NodeJS Method

fs.appendFile(path, data[, options], callback);
fs.appendFileSync(path, data[, options]);

fs.createReadStream(path[, options]);
fs.createWriteStream(path[, options]);

fs.read(fd, buffer, offset, length, position, callback);
fs.readdir(path[, options], callback);
fs.readdirSync(path[, options]);
fs.readFile(file[, options], callback);
fs.readFileSync(file[, options]);
fs.readlink(path[, options], callback);
fs.readlinkSync(path[, options]);
fs.readSync(fd, buffer, offset, length, position);

fs.realpath(path[, options], callback);
fs.realpathSync(path[, options]);

fs.watch(filename[, options][, listener]);
fs.watchFile(filename[, options], listener);

fs.write(fd, data[, position[, encoding]], callback);
fs.writeFile(file, data[, options], callback);
fs.writeFileSync(file, data[, options]);
fs.writeSync(fd, data[, position[, encoding]]);

Internationalization (I18n) Method Overview

These various file system methods read from, write to, watch and get the path to files, links and directories.

These methods are listed here, with additional details.

I18n Issues

All of the above methods take an optional encoding. The encoding should be double checked to ensure that it matches the file settings and application requirements.

Suggested Replacement

Double check to confirm that the appropriate encoding is used. If necessary, refactor the application to use an appropriate encoding.

Globalyzer will detect this method and report it as an i18n issue. If you have determined that the call is being handled correctly, you can use Globalyzer's Ignore Comment functionality to ensure that it isn't picked up in a subsequent scan.



Locale-Sensitive JavaScript Methods

 

Lingoport internationalization and localization services and software