Module: Tolk::Config

Defined in:
lib/tolk/config.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.dump_pathObject

Dump locale path by default the locales folder (config/locales)



12
13
14
# File 'lib/tolk/config.rb', line 12

def dump_path
  @dump_path
end

.mappingObject

Mapping : a hash of the type { ‘ar’ => ‘Arabic’ }



9
10
11
# File 'lib/tolk/config.rb', line 9

def mapping
  @mapping
end

Class Method Details

.resetObject



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# File 'lib/tolk/config.rb', line 14

def reset
  @dump_path = Proc.new { "#{Rails.application.root}/config/locales" }
  
  @mapping = {
    'ar'    => 'Arabic',
    'bs'    => 'Bosnian',
    'bg'    => 'Bulgarian',
    'ca'    => 'Catalan',
    'cs'    => 'Czech',
    'da'    => 'Danish',
    'de'    => 'German',
    'el'    => 'Greek',
    'en'    => 'English',
    'es'    => 'Spanish',
    'et'    => 'Estonian',
    'fa'    => 'Persian',
    'fi'    => 'Finnish',
    'fr'    => 'French',
    'he'    => 'Hebrew',
    'hr'    => 'Croatian',
    'hu'    => 'Hungarian',
    'id'    => 'Indonesian',
    'is'    => 'Icelandic',
    'it'    => 'Italian',
    'ja'    => 'Japanese',
    'ko'    => 'Korean',
    'lo'    => 'Lao',
    'lt'    => 'Lithuanian',
    'lv'    => 'Latvian',
    'mk'    => 'Macedonian',
    'nl'    => 'Dutch',
    'no'    => 'Norwegian',
    'pl'    => 'Polish',
    'pt-br' => 'Portuguese (Brazilian)',
    'pt-PT' => 'Portuguese (Portugal)',
    'ro'    => 'Romanian',
    'ru'    => 'Russian',
    'sv'    => 'Swedish',
    'sk'    => 'Slovak',
    'sl'    => 'Slovene',
    'sr'    => 'Serbian',
    'sw'    => 'Swahili',
    'th'    => 'Thai',
    'tr'    => 'Turkish',
    'uk'    => 'Ukrainian',
    'vi'    => 'Vietnamese',
    'zh-CN' => 'Chinese (Simplified)',
    'zh-TW' => 'Chinese (Traditional)'
  }
end