
Product
Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
@devraelfreeze/i18n
Advanced tools
Simple and lightweight message localisation.
To install the package, type the following command in your console:
npm i @devraelfreeze/i18n
Values | Description |
---|---|
new I18n(default_locale, locales) | Create a new I18n instance |
default_locale | The name of the default locale |
locales | Object of localised messages |
Values | Description |
---|---|
i18n.getLocale(locale) | Get a locale |
locale | Locale name |
Returns a function which calls getMessage
using the given locale name (or the default).
Values | Description |
---|---|
i18n.getMessage(locale, message, ...args) | Get a message from a specifc locale , message , ...args |
locale | Locale name |
message | Dot notation string for the message |
...args | Placeholders / Pluralisation |
const I18n = require('@devraelfreeze/i18n');
const i18n = new I18n('english', {
english: {
welcome: 'Hello, world'
},
french: {
welcome: 'Bonjour tout le monde'
}
});
/** Note: you should check if the locale exists in i18n.locales */
const french_i18n = i18n.getLocale('french'); // get locale
console.log(french_i18n('welcome')); // -> 'Bonjour tout le monde'
/** This code does exactly the same */
console.log(i18n.getMessage('french', 'welcome'));
If you have any bugs, feel free to open an issue on Github Repository
devRael#0123
If you want to use old version, you can use command
npm i @devraelfreeze/discordjs-pagination@<version>
Copyright © 2022 devRael1
This project is MIT licensed.
FAQs
Simple and lightweight message localisation
We found that @devraelfreeze/i18n demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.