Internationalization utilities for NodeSecure Scanner and CLI.
- Node.js v14 or higher
This package is available in the Node Package Repository and can be easily installed with npm or yarn.
$ npm i @nodesecure/i18n
# or
$ yarn add @nodesecure/i18n
import * as i18n from "@nodesecure/i18n";
await i18n.setLocalLang("french");
console.log(i18n.getToken("cli.executing_at"));
// Using parameters
console.log(i18n.getToken("cli.min_nodejs_version", "14"));
See TypeScript definition file.
type languages = "french" | "english";
export function getLocalLang(): languages;
export function setLocalLang(newLanguage: languages): Promise<void>;
export function getToken(token: string, ...parameters);
export function getLanguages(): languages[];
export function taggedString(str: string, ...keys: any[]): (...keys: any[]) => string;
Thanks goes to these wonderful people (emoji key):
Gentilhomme 💻 📖 👀 🛡️ 🐛 |
Nicolas Hallaert 📖 |
Quentin Lepateley 📖 |
Antoine Neff 🌍 |
Kévin VOYER 🌍 |
Alexandre Malaj 🌍 |
Vincent Dhennin 💻 📖 |
MIT