public String[] getAvailableLanguages()
    {
        List<String> languages = new ArrayList<>();
        String langDir = "i18n";
        
        if (GuiUtil.resourceExists(langDir))
        {
            for (String res : GuiUtil.getResources(langDir))
            {
                if (res.endsWith(".xml"))
                {
                    languages.add(res.substring(0, res.lastIndexOf('.')));
                }
            }
        }
        
        return languages.toArray(new String[languages.size()]);
    }