diff --git a/common.php b/common.php index 8d0692a..61888bb 100644 --- a/common.php +++ b/common.php @@ -40,9 +40,9 @@ header("Cross-Origin-Opener-Policy: same-origin"); header("Cross-Origin-Resource-Policy: same-origin"); const LANGUAGES = [ - 'de' => ['name' => 'Deutsch', 'locale' => 'de_DE', 'flag' => '🇩🇪'], - 'en' => ['name' => 'English', 'locale' => 'en_GB', 'flag' => '🇬🇧'], - 'ru' => ['name' => 'Русский', 'locale' => 'ru_RU', 'flag' => '🇷🇺'], + 'de' => ['name' => 'Deutsch', 'locale' => 'de_DE', 'flag' => '🇩🇪', 'show_in_menu' => true], + 'en' => ['name' => 'English', 'locale' => 'en_GB', 'flag' => '🇬🇧', 'show_in_menu' => true], + 'ru' => ['name' => 'Русский', 'locale' => 'ru_RU', 'flag' => '🇷🇺', 'show_in_menu' => false], ]; $language = 'en'; $locale = 'en_GB'; @@ -94,7 +94,7 @@ function menu(string $title = ''): void echo '
'; echo ''.LANGUAGES[$language]['flag'].''; foreach(LANGUAGES as $lang => $data) { - if($lang === $language){ + if($lang === $language || !$data['show_in_menu']){ continue; } echo '
'.$data['flag'].'
'; diff --git a/locale/de_DE/LC_MESSAGES/main-website.mo b/locale/de_DE/LC_MESSAGES/main-website.mo index 7ded038..b019792 100644 Binary files a/locale/de_DE/LC_MESSAGES/main-website.mo and b/locale/de_DE/LC_MESSAGES/main-website.mo differ diff --git a/locale/de_DE/LC_MESSAGES/main-website.po b/locale/de_DE/LC_MESSAGES/main-website.po index 81c19e4..0739516 100644 --- a/locale/de_DE/LC_MESSAGES/main-website.po +++ b/locale/de_DE/LC_MESSAGES/main-website.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: unnamed project\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-12-18 15:57+0100\n" -"PO-Revision-Date: 2022-12-17 23:03+0100\n" +"PO-Revision-Date: 2022-12-21 18:46+0100\n" "Last-Translator: Daniel Winzen \n" "Language-Team: German - Germany \n" "Language: de_DE\n" @@ -840,7 +840,7 @@ msgstr "Datenschutz" #: common.php:102 msgid "Add translation" -msgstr "" +msgstr "Übersetzung hinzufügen" #: new-domain.php:6 msgid "Daniel - New domain" diff --git a/locale/main-website.pot b/locale/main-website.pot index 56dd963..9c50fa6 100644 --- a/locale/main-website.pot +++ b/locale/main-website.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-18 16:03+0100\n" +"POT-Creation-Date: 2022-12-21 18:46+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n"