Skip to content

Instantly share code, notes, and snippets.

@fromheten
Created May 2, 2013 23:35

Revisions

  1. fromheten created this gist May 2, 2013.
    17 changes: 17 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    #!/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