From 36ee7ca7c1e39bc0e0bc185ef2188795bbf0ac3f Mon Sep 17 00:00:00 2001 From: Benjamin Kellermann Date: Tue, 25 May 2010 20:41:09 +0200 Subject: fallback to en if locale undefined --- date_locale.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'date_locale.rb') diff --git a/date_locale.rb b/date_locale.rb index 4ab9b4d..e40e6c7 100644 --- a/date_locale.rb +++ b/date_locale.rb @@ -217,7 +217,12 @@ module Date_locale monthnames = DATE_TEXTS[lang][:monthnames] abbr_monthnames = DATE_TEXTS[lang][:abbr_monthnames] else - raise "Missing Support for locale #{lang.inspect}" + #raise "Missing Support for locale #{lang.inspect}" + #fallback to english + daynames = DATE_TEXTS[:en][:daynames] + abbr_daynames = DATE_TEXTS[:en][:abbr_daynames] + monthnames = DATE_TEXTS[:en][:monthnames] + abbr_monthnames = DATE_TEXTS[:en][:abbr_monthnames] end #Make the original replacements, after.... -- cgit v1.2.3