app/helpers/application_helper.rb
# Available locales, as desired by Angular code.
Available locales, as desired by Angular code.
Available locales as desired by Angular code .
def available_locales_json (locales)
    locales.inject({}) do |acc_hash, locale|
      info = { name: I18nUtils::LOCALE_NAMES[locale] }
      info[:url] = nil if locale == I18n.default_locale
      acc_hash[locale] = info
      acc_hash
    end.to_json
  end
def available_locales_json ( locales ) locales . inject ( { } ) do | acc_hash , locale | info = { name : I18nUtils :: LOCALE_NAMES [ locale ] } info [ :url ] = nil if locale == I18n . default_locale acc_hash [ locale ] = info acc_hash end . to_json end
Available locales, as desired by Angular code.
Available locales as desired by Angular code .
locales