Pig Latin Encoder

The motivation for this comes from The Big Book of Small Python Projects. This is a riff on #54, Pig Latin.

To read more about the rules of of Pig Latin, as always, refer to the Wikipedia page. As there is some flexibility with respect to how the rules are implemented, here are some things to know about this encoder:

  • Digits (e.g., 123) are not encoded. If you want them encoded, provide the string-literal representation (e.g., one-hundred and twenty three)
  • Title-case is preserved (e.g., Test becomes Estay)
  • Capital-case is preserved, but the encoded text is not capitalized (e.g., CIA becomes IACay)
  • Words that begin with a vowel have way appended to them
  • Punctuation is preserved (e.g., what???? becomes hatway????)

If you have any issues at all, please contact me!

Note: Want to decode a message? Head over to the Pig Latin Decoder.