Find out how to say 'hello' in a range of different languages.
Users can generate
- a random language's greeting
greet
orgreet --lang
- the greeting for a language of their choice
greet --lang ISO-Code
npm i -g @akp-13/greetings
- This will allow you to then run
greet
and generate a random language's greeting translation from anywhere in you terminal
npm i @akp-13/greetings
- To use locally, you will need to add in scripts into the package.json.
-
Will allow you to run
{ "scripts": { "greet-es": "greet --lang es" } }
npm run greet-es
in the terminal and recieveHola!
const greetings = require("@akp-13/greetings");
const sp = greetings.greet("es");
console.log(sp);
// -> Hola!
More coming soon!
Language | ISO-Code |
---|---|
Croatian | hr |
Czech | cs |
Danish | da |
Dutch | nl |
English | en |
Estonian | et |
Finnish | fi |
French | fr |
German | de |
Hungarian | hu |
Icelandic | is |
Italian | it |
Lithuanian | lt |
Portuguese | pt |
Spanish | es |
Swedish | sv |
Turkish | tr |
-
Uday Hiwarale's article Creating CLI Executable global npm module
-
Translations from Google Translate
-
ISO Codes from Wikipedia.