README
NodeSecure i18n
Internationalization utilities for NodeSecure Scanner and CLI.
Requirements
- Node.js v14 or higher
Getting Started
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
Usage example
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"));
API
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;
Contributors β¨
Thanks goes to these wonderful people (emoji key):
Gentilhomme π» π π π‘οΈ π |
Nicolas Hallaert π |
Quentin Lepateley π |
Antoine Neff π |
KΓ©vin VOYER π |
Alexandre Malaj π |
Vincent Dhennin π» π |
License
MIT