

If a word starts with a consonant, move the consonants before the first vowel to the end of the word and add ay. Split(new, StringSplitOptions. README.md COMP1098-Assign2 The Pig Latin Translator Specification - If a word starts with a vowel, just add way to the end of the word. Return vowels.Contains(let1) ? word + "way" : restLet + let1 + "ay" String restLet = word.Substring(1, word.Length - 1) Translate words and phrases while browsing the web, and easily replenish your foreign languages dictionary using flashcards. LatinInput.Text = string.Join(" ", plWords.ToArray()) Īs a bit of a bonus, here's how you can make this operation quite a bit cleaner using Linq: private static string MakePigLatin(string word) You are assigning the value of pigLatin to the text box's Text property at the end of each loop, which means it will only have the last value that was assigned to it. Private void engWordText_KeyDown( object sender, KeyEventArgs e ) pressing enter is the same as clicking the Translate Button MessageBoxButtons.OK, MessageBoxIcon.Error) MessageBox.Show("Du måste skriva in ett engelskt ord", "PigLatin", RestLet = word.Substring(1, word.Length - 1) Ĭatch (System.ArgumentOutOfRangeException) Get professional translation just for 0.07 per word Get your text translated by proficient translators from Latin to English and modified by competent editors Text received Machine Translation Editing by translator Expert editing Client check Translation Completed Order now Translate files for 0. String transWord = engWordText.Split(' ') split the sentence into individual words
Pig Latin Translator
.Private void btnTrans_Click( object sender, EventArgs e ) This translates English input from the left into Pig Latin on the right while you are typing in real. Convert it into Pig Latin Save result as a text file footballPigLatin.txt. Python script should be able to: Open text file.

Also, you can find an online translator between Pig Latin and English here. Thanks in advance public partial class Form1 : Form You can read about rules of Pig Latin here.
#Piglatin translator code
My problem with the code found below, is that the only word in the last index of the array as reported in the results? Does anyone see the error? I will create a program that translates English words into Pig Latin.
