Skip to content

Instantly share code, notes, and snippets.

View svenfuchs's full-sized avatar

Sven Fuchs svenfuchs

View GitHub Profile
@svenfuchs
svenfuchs / rps.txt
Created March 3, 2009 10:25 — forked from practicingruby/rps.txt
german
# German version
# NOTE: We actually say "Scissors-Rock-Paper" ("Schere-Stein-Papier"), in this order
# see http://de.wikipedia.org/wiki/Schere,_Stein,_Papier
Stein
Papier
Schere
Los geht's!
def translate(locale, key, options = {})
# ...
entry = lookup(locale, key, scope) || resolve(locale, key, default, options) || raise(I18n::MissingTranslationData.new(locale, key, options))
# ...
end
def localize(locale, object, format = :default)
raise ArgumentError, "Object must be a Date, DateTime or Time object. #{object.inspect} given." unless object.respond_to?(:strftime)
if Symbol == format