From 1ffb5e758c80c7bffd411ed1daf83aff4a95c478 Mon Sep 17 00:00:00 2001 From: Wruczek Date: Sun, 27 May 2018 22:59:24 +0200 Subject: [PATCH] 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) --- config/languages/lang.bg.php | 1 + config/languages/lang.br.php | 1 + config/languages/lang.by.php | 1 + config/languages/lang.cz.php | 1 + config/languages/lang.da.php | 1 + config/languages/lang.de.php | 1 + config/languages/lang.en.php | 1 + config/languages/lang.es.php | 1 + config/languages/lang.fr.php | 1 + config/languages/lang.gr.php | 1 + config/languages/lang.hu.php | 1 + config/languages/lang.it.php | 1 + config/languages/lang.nl.php | 1 + config/languages/lang.pl.php | 1 + config/languages/lang.ru.php | 1 + config/languages/lang.se.php | 1 + config/languages/lang.tr.php | 1 + config/languages/lang.ua.php | 1 + include/header.php | 4 ++-- 19 files changed, 20 insertions(+), 2 deletions(-) diff --git a/config/languages/lang.bg.php b/config/languages/lang.bg.php index c8724b0..4010767 100644 --- a/config/languages/lang.bg.php +++ b/config/languages/lang.bg.php @@ -9,6 +9,7 @@ $lang = array(); /************* General *************/ $lang["general"]["langcode"] = "bg_BG"; +$lang["general"]["languageflag"] = "bg"; $lang["general"]["scripterror"] = "Възникна грешка! {0}: {1}"; /************* Navbar *************/ diff --git a/config/languages/lang.br.php b/config/languages/lang.br.php index 262ec3a..e8bc83f 100644 --- a/config/languages/lang.br.php +++ b/config/languages/lang.br.php @@ -9,6 +9,7 @@ $lang = array(); /************* General *************/ $lang["general"]["langcode"] = "br_GB"; +$lang["general"]["languageflag"] = "br"; $lang["general"]["scripterror"] = "Erro Ocorrido! {0}: {1}"; /************* Menu *************/ diff --git a/config/languages/lang.by.php b/config/languages/lang.by.php index 44728c2..7c484e6 100644 --- a/config/languages/lang.by.php +++ b/config/languages/lang.by.php @@ -9,6 +9,7 @@ $lang = array(); /************* General *************/ $lang["general"]["langcode"] = "be_BY"; +$lang["general"]["languageflag"] = "by"; $lang["general"]["scripterror"] = "Адбылася памылка! {0}: {1}"; /************* Navbar *************/ diff --git a/config/languages/lang.cz.php b/config/languages/lang.cz.php index c285d23..ce369d6 100644 --- a/config/languages/lang.cz.php +++ b/config/languages/lang.cz.php @@ -9,6 +9,7 @@ $lang = array(); /************* General *************/ $lang["general"]["langcode"] = "cs_CZ"; +$lang["general"]["languageflag"] = "cz"; $lang["general"]["scripterror"] = "Nastala chyba! {0}: {1}"; /************* Navbar *************/ diff --git a/config/languages/lang.da.php b/config/languages/lang.da.php index c702352..fa9f968 100644 --- a/config/languages/lang.da.php +++ b/config/languages/lang.da.php @@ -9,6 +9,7 @@ $lang = array(); /************* General *************/ $lang["general"]["langcode"] = "da_DK"; +$lang["general"]["languageflag"] = "dk"; $lang["general"]["scripterror"] = "En fejl opstod! {0}: {1}"; /************* Navbar *************/ diff --git a/config/languages/lang.de.php b/config/languages/lang.de.php index 39ff466..088d07c 100644 --- a/config/languages/lang.de.php +++ b/config/languages/lang.de.php @@ -9,6 +9,7 @@ $lang = array(); /************* General *************/ $lang["general"]["langcode"] = "de_DE"; +$lang["general"]["languageflag"] = "de"; $lang["general"]["scripterror"] = "Es ist ein Fehler aufgetreten! {0}: {1}"; /************* Navbar *************/ diff --git a/config/languages/lang.en.php b/config/languages/lang.en.php index d31cebc..1698c49 100644 --- a/config/languages/lang.en.php +++ b/config/languages/lang.en.php @@ -9,6 +9,7 @@ $lang = array(); /************* General *************/ $lang["general"]["langcode"] = "en_GB"; +$lang["general"]["languageflag"] = "gb"; $lang["general"]["scripterror"] = "An error occured! {0}: {1}"; /************* Navbar *************/ diff --git a/config/languages/lang.es.php b/config/languages/lang.es.php index e8d6a58..5e4aa9e 100644 --- a/config/languages/lang.es.php +++ b/config/languages/lang.es.php @@ -9,6 +9,7 @@ $lang = array(); /************* General *************/ $lang["general"]["langcode"] = "es-ES"; +$lang["general"]["languageflag"] = "es"; $lang["general"]["scripterror"] = "Ha ocurrido un error {0}: {1}"; /************* Navbar *************/ diff --git a/config/languages/lang.fr.php b/config/languages/lang.fr.php index ee266f3..43f88fc 100644 --- a/config/languages/lang.fr.php +++ b/config/languages/lang.fr.php @@ -9,6 +9,7 @@ $lang = array(); /************* General *************/ $lang["general"]["langcode"] = "fr_FR"; +$lang["general"]["languageflag"] = "fr"; $lang["general"]["scripterror"] = "Une erreur s'est produite ! {0} : {1}"; /************* Navbar *************/ diff --git a/config/languages/lang.gr.php b/config/languages/lang.gr.php index e16569c..476c859 100644 --- a/config/languages/lang.gr.php +++ b/config/languages/lang.gr.php @@ -9,6 +9,7 @@ $lang = array(); /************* General *************/ $lang["general"]["langcode"] = "el_GR"; +$lang["general"]["languageflag"] = "gr"; $lang["general"]["scripterror"] = "Προέκυψε Σφάλμα! {0}: {1}"; /************* Navbar *************/ diff --git a/config/languages/lang.hu.php b/config/languages/lang.hu.php index 4b4d592..6cf2687 100644 --- a/config/languages/lang.hu.php +++ b/config/languages/lang.hu.php @@ -9,6 +9,7 @@ $lang = array(); /************* Általános *************/ $lang["general"]["langcode"] = "hu_HU"; +$lang["general"]["languageflag"] = "hu"; $lang["general"]["scripterror"] = "Hiba történt! {0}: {1}"; /************* Navbár *************/ diff --git a/config/languages/lang.it.php b/config/languages/lang.it.php index 66345fd..95716b9 100644 --- a/config/languages/lang.it.php +++ b/config/languages/lang.it.php @@ -9,6 +9,7 @@ $lang = array(); /************* General *************/ $lang["general"]["langcode"] = "it"; +$lang["general"]["languageflag"] = "it"; $lang["general"]["scripterror"] = "Un errore si è verificato! {0}: {1}"; /************* Navbar *************/ diff --git a/config/languages/lang.nl.php b/config/languages/lang.nl.php index 666e5bb..36e769f 100644 --- a/config/languages/lang.nl.php +++ b/config/languages/lang.nl.php @@ -9,6 +9,7 @@ $lang = array(); /************* General *************/ $lang["general"]["langcode"] = "nl_NL"; +$lang["general"]["languageflag"] = "nl"; $lang["general"]["scripterror"] = "Er is een fout opgetreden! {0}: {1}"; /************* Navbar *************/ diff --git a/config/languages/lang.pl.php b/config/languages/lang.pl.php index 99a7ac1..82a81e3 100644 --- a/config/languages/lang.pl.php +++ b/config/languages/lang.pl.php @@ -9,6 +9,7 @@ $lang = array(); /************* General *************/ $lang["general"]["langcode"] = "pl_PL"; +$lang["general"]["languageflag"] = "pl"; $lang["general"]["scripterror"] = "Wystąpił błąd! {0}: {1}"; /************* Navbar *************/ diff --git a/config/languages/lang.ru.php b/config/languages/lang.ru.php index f1845dc..100fd9b 100644 --- a/config/languages/lang.ru.php +++ b/config/languages/lang.ru.php @@ -9,6 +9,7 @@ $lang = array(); /************* General *************/ $lang["general"]["langcode"] = "ru_RU"; +$lang["general"]["languageflag"] = "ru"; $lang["general"]["scripterror"] = "Произошла ошибка! {0}: {1}"; /************* Navbar *************/ diff --git a/config/languages/lang.se.php b/config/languages/lang.se.php index 729b03d..647a6a7 100644 --- a/config/languages/lang.se.php +++ b/config/languages/lang.se.php @@ -9,6 +9,7 @@ $lang = array(); /************* General *************/ $lang["general"]["langcode"] = "se_SV"; +$lang["general"]["languageflag"] = "se"; $lang["general"]["scripterror"] = "Ett fel inträffade! {0}: {1}"; /************* Navbar *************/ diff --git a/config/languages/lang.tr.php b/config/languages/lang.tr.php index cf417ce..824e0d7 100644 --- a/config/languages/lang.tr.php +++ b/config/languages/lang.tr.php @@ -9,6 +9,7 @@ $lang = array(); /************* General *************/ $lang["general"]["langcode"] = "tr_TR"; +$lang["general"]["languageflag"] = "tr"; $lang["general"]["scripterror"] = "Bir hata olmustur! {0}: {1}"; /************* Navbar *************/ diff --git a/config/languages/lang.ua.php b/config/languages/lang.ua.php index 77f20c7..c791662 100644 --- a/config/languages/lang.ua.php +++ b/config/languages/lang.ua.php @@ -9,6 +9,7 @@ $lang = array(); /************* General *************/ $lang["general"]["langcode"] = "uk_UA"; +$lang["general"]["languageflag"] = "ua"; $lang["general"]["scripterror"] = "Виникла помилка! {0}: {1}"; /************* Navbar *************/ diff --git a/include/header.php b/include/header.php index 67ef01e..b792174 100644 --- a/include/header.php +++ b/include/header.php @@ -97,10 +97,10 @@ $htalink = $config["general"]["enablehta"] ? "" : ".php";
  • ">