This English to Pig Latin translation program performs a (near-) perfect translation of any English text to Pig Latin. Words, phrases, sentences, paragraphs and more.
There are many dialects and forms of Pig Latin which vary from region to region, country to country, and language to language, as well as other similar Pig Latin-like ‘languages’. The dialect shown here tends to hail from California/West Coast of the United States.
Basically, the Pig Latin system used here works as follows:
* Words that start with a vowel (A, E, I, O, U) simply have “WAY” appended
to the end of the word.
* Words that start with a consonant have all consonant letters up to the
first vowel moved
to the end of the word (as opposed to just the
first consonant letter), and “AY” is appended.
(‘Y’ is counted as a vowel in this context)
The algorithm incorporates the following features and special case functionality:
- Ensures proper capitalization
- Correct upper case and lower case formatting
- Correctly translates “qu” (e.g., ietquay instead of uietqay)
- Differentiates between “Y” as vowel and “Y” as consonant
(e.g. yellow = elloyay and style = ylestay) — (except for a very few exceptions) - Correctly translates contractions
- Hyphenated words are treated as two words
- Words may consist of alphabetic characters only (A-Z and a-z)
- All punctuation, numerals, symbols and whitespace are not modified
The routines are written in JavaScript version 1.1 and the algorithms were developed and programmed by Bill Donnelly.
Google
Web Directory listing for Pig Latin resources
Search Google using Pig
Latin