Module: Wordlist::Lexer::Lang
- Defined in:
- lib/wordlist/lexer/lang.rb
Overview
Detects the system's default language.
Class Method Summary collapse
-
.default ⇒ Symbol
The default language.
Class Method Details
.default ⇒ Symbol
The default language.
18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/wordlist/lexer/lang.rb', line 18 def self.default if (lang = ENV['LANG']) lang, encoding = lang.split('.',2) lang, country = lang.split('_',2) unless lang == 'C' lang.to_sym else :en end else :en end end |