package io.wovn.wovnjava;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

public class Lang {
    public static final Map<String, Lang> LANG;
    static {
        HashMap<String, Lang> map = new HashMap<String, Lang>();
        map.put("ar", new Lang("ﺎﻠﻋﺮﺒﻳﺓ", "ar", "Arabic"));
        map.put("zh-CHS", new Lang("简体中文", "zh-CHS", "Simp Chinese"));
        map.put("zh-CHT", new Lang("繁體中文", "zh-CHT", "Trad Chinese"));
        map.put("da", new Lang("Dansk", "da", "Danish"));
        map.put("nl", new Lang("Nederlands", "nl", "Dutch"));
        map.put("en", new Lang("English", "en", "English"));
        map.put("fi", new Lang("Suomi", "fi", "Finnish"));
        map.put("fr", new Lang("Français", "fr", "French"));
        map.put("de", new Lang("Deutsch", "de", "German"));
        map.put("el", new Lang("Ελληνικά", "el", "Greek"));
        map.put("he", new Lang("עברית", "he", "Hebrew"));
        map.put("id", new Lang("Bahasa Indonesia", "id", "Indonesian"));
        map.put("it", new Lang("Italiano", "it", "Italian"));
        map.put("ja", new Lang("日本語", "ja", "Japanese"));
        map.put("ko", new Lang("한국어", "ko", "Korean"));
        map.put("ms", new Lang("Bahasa Melayu", "ms", "Malay"));
        map.put("no", new Lang("Norsk", "no", "Norwegian"));
        map.put("pl", new Lang("Polski", "pl", "Polish"));
        map.put("pt", new Lang("Português", "pt", "Portuguese"));
        map.put("ru", new Lang("Русский", "ru", "Russian"));
        map.put("es", new Lang("Español", "es", "Spanish"));
        map.put("sv", new Lang("Svensk", "sv", "Swedish"));
        map.put("th", new Lang("ภาษาไทย", "th", "Thai"));
        map.put("hi", new Lang("हिन्दी", "hi", "Hindi"));
        map.put("tr", new Lang("Türkçe", "tr", "Turkish"));
        map.put("uk", new Lang("Українська", "uk", "Ukrainian"));
        map.put("vi", new Lang("Tiếng Việt", "vi", "Vietnamese"));
        LANG = Collections.unmodifiableMap(map);
    }

    public String name;
    public String code;
    public String en;

    public Lang(String n, String c, String e) {
        super();
        this.name = n;
        this.code = c;
        this.en = e;
    }

    public static String getCode(String langName) {
        if (langName == null || langName.length() == 0) {
            return null;
        }
        if (LANG.get(langName) != null) {
            return langName;
        }
        for (Map.Entry<String, Lang> e : LANG.entrySet()) {
            String k = e.getKey();
            Lang l = e.getValue();
            String langNameLC = langName.toLowerCase();
            if ( langNameLC.equals(l.name.toLowerCase())
                    || langNameLC.equals(l.en.toLowerCase())
                    || langNameLC.equals(l.code.toLowerCase())
                    ) {
                return l.code;
            }
        }
        return null;
    }

    public static Lang getLang(String langName) {
        String langCode = getCode(langName);
        return LANG.get(langCode);
    }
}

@@ -99,23 +99,16 @@
 l.Map;%0A%0A
-public 
 class La
@@ -112,31 +112,24 @@
  Lang %7B%0A    
-public 
 static final
@@ -1959,31 +1959,24 @@
 %0A    %7D%0A%0A    
-public 
 String name;
@@ -1976,31 +1976,24 @@
 g name;%0A    
-public 
 String code;
@@ -1997,23 +1997,16 @@
 de;%0A    
-public 
 String e
@@ -2014,21 +2014,22 @@
 ;%0A%0A    p
-ublic
+rivate
  Lang(St
@@ -2149,31 +2149,24 @@
 %0A    %7D%0A%0A    
-public 
 static Strin
@@ -2432,43 +2432,8 @@
 ) %7B%0A
-            String k = e.getKey();%0A
     
@@ -2815,15 +2815,8 @@
     
-public 
 stat

Update Lang.java.