/PigLatin

Composer package to translate text to PigLatin.

Primary LanguagePHP

PigLatin

Composer package to translate english text to PigLatin.

Install

composer require defji/piglatin

Usage

 use defji\PigLatin\Translator;

 $useDash = TRUE; // use "-" separator in translated text
 $t = new Translator($useDash);
 
 echo $t->translate("All their equipment and instruments are alive.");
 // prints: All-way eir-thay equipment-way and-way instruments-way are-way alive-way.

 // translate single word
 echo $t->translateWord("question");
 // prints uestion-qay

Testing

vendor/bin/phpunit