mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-08-07 23:03:00 +03:00
Locales: Performed cleanup and alignment of locale handling
- Reduced app settings down to what's required. - Used new view-shared $locale object instead of using globals via config. - Aligned language used to default on "locale" instead of mixing locale/language. For #4501
This commit is contained in:
@@ -12,7 +12,7 @@ use BookStack\Api\ApiToken;
|
||||
use BookStack\App\Model;
|
||||
use BookStack\App\Sluggable;
|
||||
use BookStack\Entities\Tools\SlugGenerator;
|
||||
use BookStack\Translation\LanguageManager;
|
||||
use BookStack\Translation\LocaleManager;
|
||||
use BookStack\Uploads\Image;
|
||||
use Carbon\Carbon;
|
||||
use Exception;
|
||||
@@ -346,7 +346,7 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
|
||||
*/
|
||||
public function getLanguage(): string
|
||||
{
|
||||
return app()->make(LanguageManager::class)->getLanguageForUser($this);
|
||||
return app()->make(LocaleManager::class)->getForUser($this)->appLocale();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user