Hi grosser,
I needed a list of languages translated in their own language and I used your gem. I did this helper.
def languages
languages = {}
I18nData.languages.each do |code, language|
begin
languages.merge!(I18nData.languages(code)[code] => code.downcase)
rescue Exception => e
languages.merge!(I18nData.languages('EN')[code] => code.downcase)
end
end
languages
end
Hi grosser, I needed a list of languages translated in their own language and I used your gem. I did this helper.
It would better not to work with rescue but there it is this line that uses raises instead of return nil: https://github.com/grosser/i18n_data/blob/b9d0db30acc1cbfe93446f4968561c201ae15ffb/lib/i18n_data/file_data_provider.rb#L8
Wouldn't be better to use nil?
Thank you for your gem