You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
It would better not to work with rescue but there it is this line that uses raises instead of return nil:
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:
i18n_data/lib/i18n_data/file_data_provider.rb
Line 8 in b9d0db3
Wouldn't be better to use nil?
Thank you for your gem
The text was updated successfully, but these errors were encountered: