module Agave::Utils::LocaleValue

Public Class Methods

find(obj) click to toggle source
# File lib/agave/utils/locale_value.rb, line 7
def self.find(obj)
  locale_with_value = I18n.fallbacks[I18n.locale]
                          .find { |locale| obj[locale] }

  obj[locale_with_value || I18n.locale]
end