Commit abf385d7 authored by MrZYX's avatar MrZYX
Browse files

collapsed langcodes_alias_map.yml and languages.yml into locale_settings.yml

parent 5ac91d77
......@@ -7,20 +7,16 @@ require File.expand_path('../application', __FILE__)
Haml::Template.options[:format] = :html5
Haml::Template.options[:escape_html] = true
if File.exists?(File.expand_path("./config/languages.yml"))
languages = YAML::load(File.open(File.expand_path("./config/languages.yml")))
AVAILABLE_LANGUAGES = (languages['available'].length > 0) ? languages['available'] : { :en => 'English' }
DEFAULT_LANGUAGE = (AVAILABLE_LANGUAGES.include?(languages['default'])) ? languages['default'] : AVAILABLE_LANGUAGES.keys[0].to_s
AVAILABLE_LANGUAGE_CODES = languages['available'].keys.map { |v| v.to_s }
if File.exists?(File.expand_path("./config/locale_settings.yml"))
locale_settings = YAML::load(File.open(File.expand_path("./config/locale_settings.yml")))
AVAILABLE_LANGUAGES = (locale_settings['available'].length > 0) ? locale_settings['available'] : { :en => 'English' }
DEFAULT_LANGUAGE = (AVAILABLE_LANGUAGES.include?(locale_settings['default'])) ? locale_settings['default'] : AVAILABLE_LANGUAGES.keys[0].to_s
AVAILABLE_LANGUAGE_CODES = locale_settings['available'].keys.map { |v| v.to_s }
LANGUAGE_CODES_MAP = locale_settings['fallbacks']
else
AVAILABLE_LANGUAGES = { :en => 'English' }
DEFAULT_LANGUAGE = 'en'
AVAILABLE_LANGUAGE_CODES = ['en']
end
if File.exists?(File.expand_path("./config/langcodes_alias_map.yml"))
LANGUAGE_CODES_MAP = YAML::load(File.open(File.expand_path("./config/langcodes_alias_map.yml")))
else
LANGUAGE_CODES_MAP = {}
end
......
en-GB: [:en]
en-US: [:en]
en_shaw: [:en, :en-GB, :en-US]
sv: [:sv-SE]
he: [:he-IL]
es-CL: [:es]
gl: [:gl-ES]
zh: [:zh-CN, :zh-TW]
default: 'en'
available:
ca: "Català"
cs: 'Čeština'
cy: 'Cymraeg'
da: 'Dansk'
de: 'Deutsch'
el: "Ελληνικά"
en: 'English'
en_shaw: '𐑦𐑙𐑤𐑦𐑖'
es: 'Español'
es-CL: 'Español Chileno'
eu: 'Euskara'
fi: 'Suomi'
fr: 'Français'
ga: 'Gaeilge'
gl: 'Galego'
he: 'עברית'
hu: 'magyar nyelv'
id: 'Bahasa Indonesia'
is: 'íslenska'
it: 'Italiano'
lt: 'Lietuviškai'
mk: 'македонски'
nb: 'Norske'
nl: 'Nederlands'
pl: "Polski"
pt-BR: 'Português'
ro: 'Română'
ru: 'Русский'
sl: 'Slovenščina'
sk: 'Slovenčina'
sv: 'Svenska'
tr: 'Türk'
zh: '中文'
default: 'en'
available:
ca: "Català"
cs: 'Čeština'
cy: 'Cymraeg'
da: 'Dansk'
de: 'Deutsch'
el: "Ελληνικά"
en: 'English'
en_shaw: '𐑦𐑙𐑤𐑦𐑖'
es: 'Español'
es-CL: 'Español Chileno'
eu: 'Euskara'
fi: 'Suomi'
fr: 'Français'
ga: 'Gaeilge'
gl: 'Galego'
he: 'עברית'
hu: 'magyar nyelv'
id: 'Bahasa Indonesia'
is: 'íslenska'
it: 'Italiano'
lt: 'Lietuviškai'
mk: 'македонски'
nb: 'Norske'
nl: 'Nederlands'
pl: "Polski"
pt-BR: 'Português'
ro: 'Română'
ru: 'Русский'
sl: 'Slovenščina'
sk: 'Slovenčina'
sv: 'Svenska'
tr: 'Türk'
zh: '中文'
fallbacks:
en-GB: [:en]
en-US: [:en]
en_shaw: [:en, :en-GB, :en-US]
sv: [:sv-SE]
he: [:he-IL]
es-CL: [:es]
gl: [:gl-ES]
zh: [:zh-CN, :zh-TW]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment