Skip to content

Instantly share code, notes, and snippets.

@fromheten
Created May 2, 2013 23:35
Show Gist options
  • Save fromheten/5506263 to your computer and use it in GitHub Desktop.
Save fromheten/5506263 to your computer and use it in GitHub Desktop.
ö-language, ruby
#!/usr/bin/env ruby
# encoding: UTF-8
# Ö-språket by Martin Josefsson
# A cli app to translate from any language into the Ö-language, the native
# tounge of my people.
print "Wölcömö tö thö öntöröctövö Ö-sprököt trönslötör.\nWhöt shööld Ö trönslötö?\n\nRömömbör, ^c öxöts thö prögröm.\n"
def translate
text = $stdin.gets
translated = text.to_s.gsub(/[aeiouäå]/, 'ö').gsub(/[AEIOUÅÄØÆ]/, 'Ö')
puts translated
translate()
end
translate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment