diff options
author | Louise Crow <louise.crow@gmail.com> | 2015-05-15 16:57:24 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2015-05-15 17:00:37 +0100 |
commit | cfb656ca40cbe4e34a5df795bb8514e427c8c708 (patch) | |
tree | 1ba9ed9a619595215e9375e69cce910f3b9f9fe3 /lib/languages.rb | |
parent | da706b6c05ee7d0be15b59cf0fdec7f6d3ed58ec (diff) |
Allow locale specific language names and add one for Hong Kong Chinese.
Diffstat (limited to 'lib/languages.rb')
-rw-r--r-- | lib/languages.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/languages.rb b/lib/languages.rb index 7d03bc60a..4f51f9bee 100644 --- a/lib/languages.rb +++ b/lib/languages.rb @@ -32,6 +32,7 @@ class LanguageNames 'ce' => 'нохчийн мотт', 'ny' => 'chiCheŵa', 'zh' => '中文 (Zhōngwén)', + 'zh-HK' => '中文(香港)', 'cv' => 'чӑваш чӗлхи', 'kw' => 'Kernewek', 'co' => 'corsu', @@ -188,6 +189,7 @@ class LanguageNames 'zu' => 'isiZulu' } locale = locale.sub("_", "-") # normalize + return language_names[locale] if language_names[locale] main_part = I18n::Locale::Tag::Simple.tag(locale).subtags[0] return language_names[main_part] end |