Skip to content

Instantly share code, notes, and snippets.

@masterkain
Created September 4, 2008 20:44
Show Gist options
  • Save masterkain/8871 to your computer and use it in GitHub Desktop.
Save masterkain/8871 to your computer and use it in GitHub Desktop.
AVAILABLE_LOCALES = Dir.new(LOCALES_DIRECTORY).entries.collect {|x| x =~ /\.yml/ ? x.sub(/\.yml/,"") : nil }.compact.each_with_object({}) { |str, hsh| hsh[str] = YAML.load_file(LOCALES_DIRECTORY+str+".yml")[str]["this_file_language"] }.freeze
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment