Added option to change language flag

Example: for english, you cant use EN as its a language code, not a country code. So you need to choose a country, for example GB. Same goes for Dansk (DA) and Denmark (DK)
pull/90/head
Wruczek 7 years ago
parent 4013c5e2fa
commit 1ffb5e758c
No known key found for this signature in database
GPG Key ID: E740793BA694C902

@ -9,6 +9,7 @@ $lang = array();
/************* General *************/ /************* General *************/
$lang["general"]["langcode"] = "bg_BG"; $lang["general"]["langcode"] = "bg_BG";
$lang["general"]["languageflag"] = "bg";
$lang["general"]["scripterror"] = "Възникна грешка! {0}: {1}"; $lang["general"]["scripterror"] = "Възникна грешка! {0}: {1}";
/************* Navbar *************/ /************* Navbar *************/

@ -9,6 +9,7 @@ $lang = array();
/************* General *************/ /************* General *************/
$lang["general"]["langcode"] = "br_GB"; $lang["general"]["langcode"] = "br_GB";
$lang["general"]["languageflag"] = "br";
$lang["general"]["scripterror"] = "Erro Ocorrido! {0}: {1}"; $lang["general"]["scripterror"] = "Erro Ocorrido! {0}: {1}";
/************* Menu *************/ /************* Menu *************/

@ -9,6 +9,7 @@ $lang = array();
/************* General *************/ /************* General *************/
$lang["general"]["langcode"] = "be_BY"; $lang["general"]["langcode"] = "be_BY";
$lang["general"]["languageflag"] = "by";
$lang["general"]["scripterror"] = "Адбылася памылка! {0}: {1}"; $lang["general"]["scripterror"] = "Адбылася памылка! {0}: {1}";
/************* Navbar *************/ /************* Navbar *************/

@ -9,6 +9,7 @@ $lang = array();
/************* General *************/ /************* General *************/
$lang["general"]["langcode"] = "cs_CZ"; $lang["general"]["langcode"] = "cs_CZ";
$lang["general"]["languageflag"] = "cz";
$lang["general"]["scripterror"] = "Nastala chyba! {0}: {1}"; $lang["general"]["scripterror"] = "Nastala chyba! {0}: {1}";
/************* Navbar *************/ /************* Navbar *************/

@ -9,6 +9,7 @@ $lang = array();
/************* General *************/ /************* General *************/
$lang["general"]["langcode"] = "da_DK"; $lang["general"]["langcode"] = "da_DK";
$lang["general"]["languageflag"] = "dk";
$lang["general"]["scripterror"] = "En fejl opstod! {0}: {1}"; $lang["general"]["scripterror"] = "En fejl opstod! {0}: {1}";
/************* Navbar *************/ /************* Navbar *************/

@ -9,6 +9,7 @@ $lang = array();
/************* General *************/ /************* General *************/
$lang["general"]["langcode"] = "de_DE"; $lang["general"]["langcode"] = "de_DE";
$lang["general"]["languageflag"] = "de";
$lang["general"]["scripterror"] = "Es ist ein Fehler aufgetreten! {0}: {1}"; $lang["general"]["scripterror"] = "Es ist ein Fehler aufgetreten! {0}: {1}";
/************* Navbar *************/ /************* Navbar *************/

@ -9,6 +9,7 @@ $lang = array();
/************* General *************/ /************* General *************/
$lang["general"]["langcode"] = "en_GB"; $lang["general"]["langcode"] = "en_GB";
$lang["general"]["languageflag"] = "gb";
$lang["general"]["scripterror"] = "An error occured! {0}: {1}"; $lang["general"]["scripterror"] = "An error occured! {0}: {1}";
/************* Navbar *************/ /************* Navbar *************/

@ -9,6 +9,7 @@ $lang = array();
/************* General *************/ /************* General *************/
$lang["general"]["langcode"] = "es-ES"; $lang["general"]["langcode"] = "es-ES";
$lang["general"]["languageflag"] = "es";
$lang["general"]["scripterror"] = "Ha ocurrido un error {0}: {1}"; $lang["general"]["scripterror"] = "Ha ocurrido un error {0}: {1}";
/************* Navbar *************/ /************* Navbar *************/

@ -9,6 +9,7 @@ $lang = array();
/************* General *************/ /************* General *************/
$lang["general"]["langcode"] = "fr_FR"; $lang["general"]["langcode"] = "fr_FR";
$lang["general"]["languageflag"] = "fr";
$lang["general"]["scripterror"] = "Une erreur s'est produite ! {0} : {1}"; $lang["general"]["scripterror"] = "Une erreur s'est produite ! {0} : {1}";
/************* Navbar *************/ /************* Navbar *************/

@ -9,6 +9,7 @@ $lang = array();
/************* General *************/ /************* General *************/
$lang["general"]["langcode"] = "el_GR"; $lang["general"]["langcode"] = "el_GR";
$lang["general"]["languageflag"] = "gr";
$lang["general"]["scripterror"] = "Προέκυψε Σφάλμα! {0}: {1}"; $lang["general"]["scripterror"] = "Προέκυψε Σφάλμα! {0}: {1}";
/************* Navbar *************/ /************* Navbar *************/

@ -9,6 +9,7 @@ $lang = array();
/************* Általános *************/ /************* Általános *************/
$lang["general"]["langcode"] = "hu_HU"; $lang["general"]["langcode"] = "hu_HU";
$lang["general"]["languageflag"] = "hu";
$lang["general"]["scripterror"] = "Hiba történt! {0}: {1}"; $lang["general"]["scripterror"] = "Hiba történt! {0}: {1}";
/************* Navbár *************/ /************* Navbár *************/

@ -9,6 +9,7 @@ $lang = array();
/************* General *************/ /************* General *************/
$lang["general"]["langcode"] = "it"; $lang["general"]["langcode"] = "it";
$lang["general"]["languageflag"] = "it";
$lang["general"]["scripterror"] = "Un errore si è verificato! {0}: {1}"; $lang["general"]["scripterror"] = "Un errore si è verificato! {0}: {1}";
/************* Navbar *************/ /************* Navbar *************/

@ -9,6 +9,7 @@ $lang = array();
/************* General *************/ /************* General *************/
$lang["general"]["langcode"] = "nl_NL"; $lang["general"]["langcode"] = "nl_NL";
$lang["general"]["languageflag"] = "nl";
$lang["general"]["scripterror"] = "Er is een fout opgetreden! {0}: {1}"; $lang["general"]["scripterror"] = "Er is een fout opgetreden! {0}: {1}";
/************* Navbar *************/ /************* Navbar *************/

@ -9,6 +9,7 @@ $lang = array();
/************* General *************/ /************* General *************/
$lang["general"]["langcode"] = "pl_PL"; $lang["general"]["langcode"] = "pl_PL";
$lang["general"]["languageflag"] = "pl";
$lang["general"]["scripterror"] = "Wystąpił błąd! {0}: {1}"; $lang["general"]["scripterror"] = "Wystąpił błąd! {0}: {1}";
/************* Navbar *************/ /************* Navbar *************/

@ -9,6 +9,7 @@ $lang = array();
/************* General *************/ /************* General *************/
$lang["general"]["langcode"] = "ru_RU"; $lang["general"]["langcode"] = "ru_RU";
$lang["general"]["languageflag"] = "ru";
$lang["general"]["scripterror"] = "Произошла ошибка! {0}: {1}"; $lang["general"]["scripterror"] = "Произошла ошибка! {0}: {1}";
/************* Navbar *************/ /************* Navbar *************/

@ -9,6 +9,7 @@ $lang = array();
/************* General *************/ /************* General *************/
$lang["general"]["langcode"] = "se_SV"; $lang["general"]["langcode"] = "se_SV";
$lang["general"]["languageflag"] = "se";
$lang["general"]["scripterror"] = "Ett fel inträffade! {0}: {1}"; $lang["general"]["scripterror"] = "Ett fel inträffade! {0}: {1}";
/************* Navbar *************/ /************* Navbar *************/

@ -9,6 +9,7 @@ $lang = array();
/************* General *************/ /************* General *************/
$lang["general"]["langcode"] = "tr_TR"; $lang["general"]["langcode"] = "tr_TR";
$lang["general"]["languageflag"] = "tr";
$lang["general"]["scripterror"] = "Bir hata olmustur! {0}: {1}"; $lang["general"]["scripterror"] = "Bir hata olmustur! {0}: {1}";
/************* Navbar *************/ /************* Navbar *************/

@ -9,6 +9,7 @@ $lang = array();
/************* General *************/ /************* General *************/
$lang["general"]["langcode"] = "uk_UA"; $lang["general"]["langcode"] = "uk_UA";
$lang["general"]["languageflag"] = "ua";
$lang["general"]["scripterror"] = "Виникла помилка! {0}: {1}"; $lang["general"]["scripterror"] = "Виникла помилка! {0}: {1}";
/************* Navbar *************/ /************* Navbar *************/

@ -97,10 +97,10 @@ $htalink = $config["general"]["enablehta"] ? "" : ".php";
<li data-toggle="tooltip" data-placement="bottom" title="<?php tl($lang["navbar"]["connecttooltip"], [$config['teamspeak']['displayip']]); ?>"><a href="ts3server://<?php echo $config['teamspeak']['displayip']; ?>"><i class="fa fa-sign-in" aria-hidden="true"></i><?php tl($lang["navbar"]["connect"]); ?></a></li> <li data-toggle="tooltip" data-placement="bottom" title="<?php tl($lang["navbar"]["connecttooltip"], [$config['teamspeak']['displayip']]); ?>"><a href="ts3server://<?php echo $config['teamspeak']['displayip']; ?>"><i class="fa fa-sign-in" aria-hidden="true"></i><?php tl($lang["navbar"]["connect"]); ?></a></li>
<li class="dropdown"> <li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i class="famfamfam-flags <?php echo $langcode == "en" ? "gb" : $langcode; ?>" aria-hidden="true"></i> Language <span class="caret"></span></a> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i class="famfamfam-flags <?php tl($lang["general"]["languageflag"]) ?>" aria-hidden="true"></i> Language <span class="caret"></span></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<!-- Languages are sorted by number of total users in millions in all countries, based on ethnologue.com and Wikipedia --> <!-- Languages are sorted by number of total speakers in millions in all countries, based on ethnologue.com and Wikipedia -->
<li><a href="?lang=en"><i class="famfamfam-flags gb" aria-hidden="true"></i> English</a></li> <!-- English : 1010 --> <li><a href="?lang=en"><i class="famfamfam-flags gb" aria-hidden="true"></i> English</a></li> <!-- English : 1010 -->
<li><a href="?lang=es"><i class="famfamfam-flags es" aria-hidden="true"></i> Español</a></li> <!-- Spanish : 528 --> <li><a href="?lang=es"><i class="famfamfam-flags es" aria-hidden="true"></i> Español</a></li> <!-- Spanish : 528 -->

Loading…
Cancel
Save