Skip to content
/ i18n Public
forked from NodeSecure/i18n

NodeSecure Internationalization

License

Notifications You must be signed in to change notification settings

Mathieuka/i18n

 
 

Repository files navigation

NodeSecure i18n

version Maintenance Security Responsible Disclosure mit build

Internationalization utilities for NodeSecure Scanner and CLI.

Requirements

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 ✨

All 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

About

NodeSecure Internationalization

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%