Created
May 2, 2013 23:35
-
-
Save fromheten/5506263 to your computer and use it in GitHub Desktop.
ö-language, ruby
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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