php - locale variable is ignored in symfony translator -
i have installed fos user bundle, i18n routing bundle , translation bundle, , enabled them in app kernel.
for config have:
parameters.yml
parameters: locale: en
config.yml
framework: translator: enabled: true default_locale: %locale% jms_i18n_routing: default_locale: %locale% locales: [%locale%, fr, es] strategy: prefix_except_default
and security config paths beginning ^/[a-z][a-z]/
security.yml
access_control: - { path: ^/[a-z][a-z]/login$, role: is_authenticated_anonymously } - { path: ^/[a-z][a-z]/login_check$, role: is_authenticated_anonymously } - { path: ^/[a-z][a-z]/resetting, role: is_authenticated_anonymously } - { path: ^/[a-z][a-z]/profile/, role: role_user }
i have set routes not paths in fos_user
config...
everything ok routes , urls in browser.
problem views not translated. come english, default locale when have /fr/my-path
locale route attribute fr
.
_locale
fr
.
request::locale
fr
.
hl cookie fr
.
i have set break point in symfony\component\translation::trans()
, seems getlocale()
return en
.
did have misconfigured something? or may bug?
Comments
Post a Comment