From ca570828be31fd932e18fc6086f8e8189d9e41da Mon Sep 17 00:00:00 2001 From: Jeremy Haile Date: Tue, 28 Nov 2017 11:02:17 -0500 Subject: [PATCH] Include common names in the BY_NAME hash so that results like "greek" work. --- lib/language_list.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/language_list.rb b/lib/language_list.rb index 859cd5f..360198e 100644 --- a/lib/language_list.rb +++ b/lib/language_list.rb @@ -93,6 +93,7 @@ def self.find(code) BY_ISO_639_2T = {} ALL_LANGUAGES.each do |lang| BY_NAME[lang.name.downcase] = lang + BY_NAME[lang.common_name.downcase] = lang if lang.common_name BY_ISO_639_1[lang.iso_639_1] = lang if lang.iso_639_1 BY_ISO_639_3[lang.iso_639_3] = lang if lang.iso_639_3 BY_ISO_639_2B[lang.iso_639_2b] = lang if lang.iso_639_2b