# File lib/route_translator/host.rb, line 24 def locale_from_host(host) locales = RouteTranslator.config.host_locales.each_with_object([]) do |(pattern, locale), result| result << locale.to_sym if host =~ regex_for(pattern) end locales &= I18n.available_locales (locales.first || I18n.default_locale).to_sym end