mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-23 03:19:31 +00:00
Use language setting of users when logging in.
This commit is contained in:
parent
0dd20394cb
commit
0bfcec77fb
9 changed files with 97 additions and 8 deletions
|
|
@ -28,6 +28,7 @@ security:
|
|||
check_path: login
|
||||
csrf_token_generator: security.csrf.token_manager
|
||||
use_referer: true
|
||||
default_target_path: '/'
|
||||
|
||||
logout:
|
||||
path: logout
|
||||
|
|
|
|||
|
|
@ -1,3 +1,10 @@
|
|||
#index:
|
||||
# path: /
|
||||
# controller: App\Controller\DefaultController::index
|
||||
|
||||
# Redirect every url without an locale to the locale of the user/the global base locale
|
||||
redirector:
|
||||
path: /{url}
|
||||
requirements:
|
||||
url: ".*"
|
||||
controller: App\Controller\RedirectController:addLocalePart
|
||||
|
|
@ -2,7 +2,4 @@ controllers:
|
|||
resource: ../../src/Controller/
|
||||
type: annotation
|
||||
|
||||
prefix:
|
||||
en: '/en'
|
||||
de: '/de'
|
||||
'%locale%': '/'
|
||||
prefix: '{_locale}'
|
||||
|
|
|
|||
|
|
@ -49,6 +49,10 @@ services:
|
|||
- name: doctrine.orm.entity_listener
|
||||
|
||||
|
||||
App\Controller\RedirectController:
|
||||
arguments:
|
||||
$default_locale: '%locale%'
|
||||
|
||||
App\Command\UpdateExchangeRatesCommand:
|
||||
arguments:
|
||||
$base_current: '%default_currency%'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue