2020-03-29 06:46:31 +00:00
|
|
|
# Based on ISO_639-3 Codes. ref: https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes
|
|
|
|
# This Hash is used in account model, so do not change the index for existing languages
|
|
|
|
|
|
|
|
LANGUAGES_CONFIG = {
|
2020-05-06 08:08:36 +00:00
|
|
|
0 => { name: 'English', iso_639_3_code: 'eng', iso_639_1_code: 'en', enabled: true },
|
|
|
|
1 => { name: 'Arabic', iso_639_3_code: 'ara', iso_639_1_code: 'ar', enabled: false },
|
2020-05-19 13:35:10 +00:00
|
|
|
2 => { name: 'Dutch', iso_639_3_code: 'nld', iso_639_1_code: 'nl', enabled: true },
|
2020-05-06 08:54:20 +00:00
|
|
|
3 => { name: 'French', iso_639_3_code: 'fra', iso_639_1_code: 'fr', enabled: true },
|
2020-05-06 08:08:36 +00:00
|
|
|
4 => { name: 'German', iso_639_3_code: 'deu', iso_639_1_code: 'de', enabled: true },
|
|
|
|
5 => { name: 'Hindi', iso_639_3_code: 'hin', iso_639_1_code: 'hi', enabled: false },
|
2020-07-07 19:29:30 +00:00
|
|
|
6 => { name: 'Italian', iso_639_3_code: 'ita', iso_639_1_code: 'it', enabled: true },
|
2020-05-06 08:08:36 +00:00
|
|
|
7 => { name: 'Japanese', iso_639_3_code: 'jpn', iso_639_1_code: 'ja', enabled: false },
|
|
|
|
8 => { name: 'Korean', iso_639_3_code: 'kor', iso_639_1_code: 'ko', enabled: false },
|
|
|
|
9 => { name: 'Portuguese', iso_639_3_code: 'por', iso_639_1_code: 'pt', enabled: true },
|
2020-08-22 12:24:16 +00:00
|
|
|
10 => { name: 'Russian', iso_639_3_code: 'rus', iso_639_1_code: 'ru', enabled: true },
|
2020-05-06 08:08:36 +00:00
|
|
|
11 => { name: 'Chinese', iso_639_3_code: 'zho', iso_639_1_code: 'zh', enabled: false },
|
2020-06-02 18:13:03 +00:00
|
|
|
12 => { name: 'Spanish', iso_639_3_code: 'spa', iso_639_1_code: 'es', enabled: true },
|
2020-05-06 08:08:36 +00:00
|
|
|
13 => { name: 'Malayalam', iso_639_3_code: 'mal', iso_639_1_code: 'ml', enabled: true },
|
|
|
|
14 => { name: 'Catalan', iso_639_3_code: 'cat', iso_639_1_code: 'ca', enabled: true },
|
2020-05-06 08:54:20 +00:00
|
|
|
15 => { name: 'Greek', iso_639_3_code: 'ell', iso_639_1_code: 'el', enabled: true },
|
|
|
|
16 => { name: 'Portuguese, Brazilian', iso_639_3_code: '', iso_639_1_code: 'pt_BR', enabled: true },
|
2020-07-07 19:29:30 +00:00
|
|
|
17 => { name: 'Romanian', iso_639_3_code: 'ron', iso_639_1_code: 'ro', enabled: true },
|
2020-07-10 15:38:59 +00:00
|
|
|
18 => { name: 'Tamil', iso_639_3_code: 'tam', iso_639_1_code: 'ta', enabled: true },
|
2020-09-22 13:46:00 +00:00
|
|
|
19 => { name: 'Persian', iso_639_3_code: 'fas', iso_639_1_code: 'fa', enabled: true },
|
|
|
|
20 => { name: 'Traditional Chinese', iso_639_3_code: 'zho', iso_639_1_code: 'zh_TW', enabled: true }
|
2020-05-06 08:08:36 +00:00
|
|
|
}.filter { |_key, val| val[:enabled] }.freeze
|
|
|
|
|
|
|
|
Rails.configuration.i18n.available_locales = LANGUAGES_CONFIG.map { |_index, lang| lang[:iso_639_1_code].to_sym }
|