]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Middleware/Localization.php
Fix Book form (create) returning to the full books list on cancel
[bookstack] / app / Http / Middleware / Localization.php
index 29a4369548b4af622c9b60ee3f8b376c162b7e49..b5e702781ef53b6d7bd28b76cbe5ca42728a283b 100644 (file)
@@ -57,7 +57,7 @@ class Localization
             $locale = setting()->getUser(user(), 'language', $defaultLang);
         }
 
-        config()->set('app.lang', $this->getLocaleIso($locale));
+        config()->set('app.lang', str_replace('_', '-', $this->getLocaleIso($locale)));
 
         // Set text direction
         if (in_array($locale, $this->rtlLocales)) {