This file contains 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
# 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! | |
This file contains 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
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 |
NewerOlder