From a75cfd1f2553de3f2cae85153f6da889a6a34bc9 Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Mon, 25 Oct 2021 14:49:03 +0100 Subject: [PATCH] Added estonian to language logic --- app/Config/app.php | 2 +- app/Http/Middleware/Localization.php | 2 ++ resources/lang/en/settings.php | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Config/app.php b/app/Config/app.php index 120644aed..f90a7dd76 100755 --- a/app/Config/app.php +++ b/app/Config/app.php @@ -61,7 +61,7 @@ return [ 'locale' => env('APP_LANG', 'en'), // Locales available - 'locales' => ['en', 'ar', 'bg', 'bs', 'ca', 'cs', 'da', 'de', 'de_informal', 'es', 'es_AR', 'fa', 'fr', 'he', 'hr', 'hu', 'id', 'it', 'ja', 'ko', 'lt', 'lv', 'nl', 'nb', 'pt', 'pt_BR', 'sk', 'sl', 'sv', 'pl', 'ru', 'th', 'tr', 'uk', 'vi', 'zh_CN', 'zh_TW'], + 'locales' => ['en', 'ar', 'bg', 'bs', 'ca', 'cs', 'da', 'de', 'de_informal', 'es', 'es_AR', 'et', 'fa', 'fr', 'he', 'hr', 'hu', 'id', 'it', 'ja', 'ko', 'lt', 'lv', 'nl', 'nb', 'pt', 'pt_BR', 'sk', 'sl', 'sv', 'pl', 'ru', 'th', 'tr', 'uk', 'vi', 'zh_CN', 'zh_TW'], // Application Fallback Locale 'fallback_locale' => 'en', diff --git a/app/Http/Middleware/Localization.php b/app/Http/Middleware/Localization.php index e82465146..d8e1253e5 100644 --- a/app/Http/Middleware/Localization.php +++ b/app/Http/Middleware/Localization.php @@ -15,6 +15,7 @@ class Localization /** * Map of BookStack locale names to best-estimate system locale names. + * Locales can often be found by running `locale -a` on a linux system. */ protected $localeMap = [ 'ar' => 'ar', @@ -27,6 +28,7 @@ class Localization 'en' => 'en_GB', 'es' => 'es_ES', 'es_AR' => 'es_AR', + 'et' => 'et_EE', 'fr' => 'fr_FR', 'he' => 'he_IL', 'hr' => 'hr_HR', diff --git a/resources/lang/en/settings.php b/resources/lang/en/settings.php index 0ab168b66..46df0d07d 100755 --- a/resources/lang/en/settings.php +++ b/resources/lang/en/settings.php @@ -248,6 +248,7 @@ return [ 'de_informal' => 'Deutsch (Du)', 'es' => 'Español', 'es_AR' => 'Español Argentina', + 'et' => 'Eesti Keel', 'fr' => 'Français', 'he' => 'עברית', 'hr' => 'Hrvatski',