ianlchapman / pig-latin-translator
A translation system to convert to and from Pig Latin
Installs: 193
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 1
Open Issues: 0
pkg:composer/ianlchapman/pig-latin-translator
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.');