Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [Symfony] FosUserBundle, Języki - problem z językiem polskim podczas logowania
mrfire1
post 19.05.2018, 10:34:53
Post #1





Grupa: Zarejestrowani
Postów: 1
Pomógł: 0
Dołączył: 19.05.2018

Ostrzeżenie: (0%)
-----


Jestem nowy na forum - także cześć wszystkim. Działam już kilka miesięcy na symfony, ale jeszcze daleko mi do eksperta. Mam problem z językiem polskim i angielskim podczas logowania. Zarówno jak loguję się poprzez /en/login jak i /pl/login to przekierowuje mnie zawsze na stronę po zalogowaniu po angielsku. Prosiłbym o podpowiedzi co do konfiguracji, aby logowanie z /pl/login poprawnie przekierowywało na /pl/* . Z góry dziękuję za wszelkie sugestie.

PLIKI:
  1. firewalls:
  2. # disables authentication for assets and the profiler, adapt it according to your needs
  3. dev:
  4. pattern: ^/(_(profiler|wdt)|css|images|js)/
  5. security: false
  6.  
  7. main:
  8. pattern: ^/
  9. form_login:
  10. login_path: fos_user_security_login
  11. default_target_path: /%locale%/panel/show
  12. provider: fos_userbundle
  13. check_path: fos_user_security_check
  14. csrf_token_generator: security.csrf.token_manager
  15. # if you are using Symfony < 2.8, use the following config instead:
  16. # csrf_provider: form.csrf_provider
  17. logout:
  18. path: fos_user_security_logout
  19. target: /%locale%
  20. anonymous: true
  21. logout: true


Routing:
  1. app:
  2. resource: "@AppBundle/Controller/"
  3. type: annotation
  4. requirements:
  5. _locale: en|pl
  6.  
  7. fos_user:
  8. resource: "@FOSUserBundle/Resources/config/routing/all.xml"
  9. prefix: /{_locale}/
  10. requirements:
  11. _locale: en|pl


Ten post edytował mrfire1 19.05.2018, 10:36:35
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 19.04.2024 - 14:39