Labels in Sonata Admin Bundle

前端 未结 2 1404
一生所求
一生所求 2020-12-28 19:04

I have started new with the sonata admin bundle. its very handy and easy to setup and use , but i can\'t seem to get the translation fixed for the default labels

e.

2条回答
  •  时光取名叫无心
    2020-12-28 19:32

    Expanding on @mkjasinski's comment above, the Symfony Translation component expects to find a _locale property on the request. If this is missing, or no translation can be found for the specified locale, it uses a fallback value. However this fallback value is also blank by default hence seeing the translation labels instead of text.

    To fix this, set the default translation locale by adding the following to config.yml:

    framework:
      #...
      translator:
        fallback: %locale%
    

提交回复
热议问题