locnode-updated
v1.0.4
Published
Libarary for server messages localization
Downloads
8
Readme
locnode is a lightweight Node.js package for simple server-side message localization. It allows you to add as many languages as you want in a locale file, and then make those languages accessible in your code.
Features:
Add as many languages as you want in a locale file. Make languages accessible in your code using the global.loadLocaleMessages object.
Load locale messages from a JSON file
installation
npm install locnode
Usage
// Load the locnode package global.loadLocaleMessages = require("locnode");
// Load the locale messages for the English language const enLocaleMessages = loadLocaleMessages.loadLocaleMessages("en");
// Get the localized message for the key "keyofyourmessage" const localizedMessage = enLocaleMessages.keyofyourmessage;
#Keywords #locale,#nodejs ,#backend,#message #lang