ianlchapman / pig-latin-translator
This package is abandoned and no longer maintained.
No replacement package was suggested.
A translation system to convert to and from Pig Latin
v1.0.0
2017-11-24 11:52 UTC
Requires
- php: >=7.0.0
Requires (Dev)
- phpunit/phpunit: ^6.4
This package is auto-updated.
Last update: 2021-09-29 02:03:44 UTC
README
A Pig Latin translator that converts English words and sentences in to Pig Latin written using PHP.
Features
- Translates English in to Pig Latin following the rules outlined on wikipedia
- Handles sentences that contain the following punctuation elements: .,!?()
- Suite of unit tests
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist ianlchapman/pig-latin-translator "*"
or add
"ianlchapman/pig-latin-translator": "*"
to the require section of your composer.json
file.
Usage
Translate a single word
use IanLChapman\PigLatinTranslator\Parser; $translator = new Parser(); $translation = $translator->translate('String');
Translate a sentence
use IanLChapman\PigLatinTranslator\Parser; $translator = new Parser(); $translation = $translator->translate('Sentence to be translated.');