From 49caf98b25c339e652e7ce2e7c474aa6921c625f Mon Sep 17 00:00:00 2001 From: Corbin Davenport Date: Fri, 24 Nov 2017 20:10:08 -0500 Subject: [PATCH] Language drop-down menu now automatically generated --- js/settings.js | 21 ++++++++++++----- settings.html | 62 +------------------------------------------------- 2 files changed, 16 insertions(+), 67 deletions(-) diff --git a/js/settings.js b/js/settings.js index 02eb94f..fdf9ead 100644 --- a/js/settings.js +++ b/js/settings.js @@ -6,12 +6,22 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/. */ -// List of Wikipedia's supported language in an array, for the auto-detect functionality +// List of Wikipedia's supported language in an array var langArray= ["ar","az","bg","nan","be","ca","cs","da","de","et","el","en","simple","es","eo","eu","fa","fr","gl","ko","hy","hi","hr","id","it","he","ka","la","lt","hu","ms","min","nl","ja","no","nn","ce","uz","pl","pt","kk","ro","ru","ceb","sk","sl","sr","sh","fi","sv","ta","th","tr","uk","ur","vi","vo","war","zh"]; var detailArray = ["العربية","Azərbaycanca","Български","Bân-lâm-gú / Hō-ló-oē","Беларуская (Акадэмічная)","Català","Čeština","Dansk","Deutsch","Eesti","Ελληνικά","English","Simple English","Español","Esperanto","Euskara","فارسی","Français","Galego","한국어","Հայերեն","हिन्दी","Hrvatski","Bahasa Indonesia","Italiano","עברית","ქართული","Latina","Lietuvių","Magyar","Bahasa Melayu","Bahaso Minangkabau","Nederlands","日本語","Norsk (Bokmål)","Norsk (Nynorsk)","Нохчийн","Oʻzbekcha / Ўзбекча","Polski","Português","Қазақша / Qazaqşa / قازاقشا","Română","Русский","Sinugboanong Binisaya","Slovenčina","Slovenščina","Српски / Srpski","Srpskohrvatski / Српскохрватски","Suomi","Svenska","தமிழ்","ภาษาไทย","Türkçe","Українська","اردو","Tiếng Việt","Volapük","Winaray","中文"]; // Load settings $(window).on('load', function() { + // Populate languages menu + langArray.forEach(function callback(currentValue, index, array) { + $('#language').append($('