From 443794b0005ba5812fabbb5318853bb367a677a2 Mon Sep 17 00:00:00 2001
From: Hakaba Hitoyo <hakabahitoyo@yahoo.co.jp>
Date: Wed, 29 May 2019 05:31:03 +0000
Subject: i18n/Add Japanese with kanji (2)

---
 .../interface_language_switcher.vue                         | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

(limited to 'src/components/interface_language_switcher/interface_language_switcher.vue')

diff --git a/src/components/interface_language_switcher/interface_language_switcher.vue b/src/components/interface_language_switcher/interface_language_switcher.vue
index 3f58af2c..9f7877c6 100644
--- a/src/components/interface_language_switcher/interface_language_switcher.vue
+++ b/src/components/interface_language_switcher/interface_language_switcher.vue
@@ -26,7 +26,7 @@
       },
 
       languageNames () {
-        return _.map(this.languageCodes, ISO6391.getName)
+        return _.map(this.languageCodes, this.getLanguageName)
       },
 
       language: {
@@ -36,6 +36,17 @@
           this.$i18n.locale = val
         }
       }
+    },
+
+    methods: {
+      getLanguageName (code) {
+        const specialLanguageNames = {
+          'ja': 'Japanese (やさしいにほんご)',
+          'ja_pedantic': 'Japanese (日本語)',
+          'zh': 'Chinese (简体中文)'
+        }
+        return specialLanguageNames[code] || ISO6391.getName(code)
+      }
     }
   }
 </script>
-- 
cgit v1.2.3-70-g09d2

