Rusho Limbaugho
by clayshannon
HTML
<h2>Conception</h2>
<p>I was intrigued by the apparent ease at which many English words could be "Spanishized" when I saw an online "cheat sheet" which provides a list of English-word endings which can quite simply be altered to form their Spanish equivalents.</p>
<h2>Deception</h2>
<p>I was then "inspired" - I swear, no Cerveza was involved! - to write a quick-and-dirty utility to take English text and
Spanishize it using this handy list; or perhaps the results (you can judge for yourself) are more like Spanglifying/Manglifying, or Spanglicizing, if you will.</p>
<p>Anyway, this is all the C# code that's needed, assuming you have on the form a button named buttonOpen, an
OpenFileDialog with the default name (openFileDialog1), a button named buttonSpanglify, and textboxes with their multiline
property set to True named textBoxEnglish and textBoxSpanglish:</p>
<pre>
private void buttonOpen_Click(object sender, EventArgs e)
{
DialogResult result = openFileDialog1.ShowDialog();
if (result == DialogResult.OK)
{
string file = openFileDialog1.FileName;
try
{
string text = File.ReadAllText(file);
textBoxEnglish.Text = text;
}
catch (IOException)
{
}
}
}
private void buttonSpanglify_Click(object sender, EventArgs e)
{
string spanglifiedText = string.Empty;
string s = textBoxEnglish.Text;
spanglifiedText = s.Replace("ation", "acion");
spanglifiedText = spanglifiedText.Replace("ic ", "ico ");
spanglifiedText = spanglifiedText.Replace("ic.", "ico.");
spanglifiedText = spanglifiedText.Replace("ic,", "ico,");
spanglifiedText = spanglifiedText.Replace("ic;", "ico;");
spanglifiedText = spanglifiedText.Replace("ic:", "ico:");
...