Module: Browser::Language
- Included in:
- Browser
- Defined in:
- lib/browser/methods/language.rb
Constant Summary collapse
- LANGUAGES =
YAML.load_file(File.("../../../../languages.yml", __FILE__))
Instance Attribute Summary collapse
-
#accept_language ⇒ Object
Return an array with all preferred languages that this browser accepts.
Instance Attribute Details
#accept_language ⇒ Object
Return an array with all preferred languages that this browser accepts.
9 10 11 12 13 14 |
# File 'lib/browser/methods/language.rb', line 9 def accept_language @accept_language .gsub(/;q=[\d.]+/, "") .split(",") .map {|l| l.downcase.gsub(/\s/m, "") } end |