add non iso countries, i guess
This commit is contained in:
parent
53f3e487fd
commit
9da3472179
|
@ -9,19 +9,16 @@ I18n.with_locale("") do
|
||||||
if APP_LOCALES[l].nil?
|
if APP_LOCALES[l].nil?
|
||||||
cc = l.split("-").last
|
cc = l.split("-").last
|
||||||
|
|
||||||
if flag_map.index(cc).nil?
|
if flag_map.index(cc).nil? and not locale_map[cc].nil?
|
||||||
cc = locale_map[cc]
|
cc = locale_map[cc]
|
||||||
end
|
end
|
||||||
|
|
||||||
unless flag_map.index(cc).nil?
|
begin
|
||||||
begin
|
lang = I18n.translate("#{l}.language")
|
||||||
lang = I18n.translate("#{l}.language")
|
lang = '' if lang.index "translation missing"
|
||||||
lang = '' if lang.index "translation missing"
|
APP_LOCALES[l] = [lang, cc]
|
||||||
APP_LOCALES[l] = [lang, cc]
|
rescue
|
||||||
rescue I18n.MissingTranslationData
|
APP_LOCALES[l] = ['', cc]
|
||||||
APP_LOCALES[l] = ['', cc]
|
|
||||||
rescue
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue