Skip to content

alvarocastro/wow-lexicon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wow-lexicon

NPM Build status Maintainability status Coverage status Bundle size Code style: XO Release: Semantic

World of Warcraft translator that tries to emulate the same translation process used in the game client.

Translation is unidirectional, you can translate from "common" (human language like this) to any of the supported languages, but not the other direction, since the words are simply replaced with another random word of the same lenght.

Install

npm install wow-lexicon

Usage

const lexicon = require('wow-lexicon');

lexicon.translate('dwarven', 'This is JavaScript!!');
// => Helm we Gar-Mogoth!!

There is also a shortcut to each language for easier use:

lexicon.orcish('This is JavaScript!!');
// => Tago ag Maza'rotha!!

Also you can try it directly from the console:

$ wow-lexicon draconic Also in the console
[Draconic] Aman il daz toralar

translate(language, text)

Returns the translated text.

language

Type: String

The name of one of the supported languages.

text

Type: String

The text to translate.

Supported languages

Language definitions are taken from the wiki and other sources of the game.

Contributing

Contributions are always welcome! Please run npm test beforehand to ensure everything is ok.

Support

If you use this package please consider starring it :)