Sha256: c64313c1fbb18e129de339e3154368b25595a3db02a6e9ddadd50b34edb315ee
Contents?: true
Size: 589 Bytes
Versions: 15
Compression:
Stored size: 589 Bytes
Contents
module Kaui module LocaleHelper def get_available_locales locale_yaml_file = File.join(File.dirname(__FILE__), 'locale_helper.yml') available_locales = YAML::load_file(locale_yaml_file) favorites = [] locales = [] available_locales.each do |locale| option = ["#{locale[:language]} #{locale[:country]} (#{locale[:language_tag]})", locale[:language_tag] ] locales << option unless locale[:favorite] favorites << option if locale[:favorite] end favorites.concat(['---------------']).concat(locales) end end end
Version data entries
15 entries across 15 versions & 1 rubygems