0

I'm trying to translate my back office into Italian. I use symfony 4 for my site, and sulu like librarie to have a small cms

I added a file "admin.it.json" in my translations folder, and my sulu_core.yaml file looks like this:

sulu_core:
locales:
    de: Deutsch
    en: English
    it: Italian
translations:
    - de
    - en
    - it
fallback_locale: '%default_locale%'

Unfortunately, my site is blocking on loading, and do not do anything else. I can not do anything, there is no mistake.

Even when I go on the link

localhost:8000/admin/translations?local=it

my translations are present, but the administration is not displayed.

Do you have an idea please?

Dax
  • 199
  • 1
  • 3
  • 9
  • When the _locale is in the URL with a route such as `@Route("/{_locale}/contact")` the code will be promoted to the translations. https://symfony.com/doc/current/translation/locale.html#the-locale-and-the-url – Alister Bulman Oct 14 '19 at 21:13
  • in my case I do not need to have the _local in my URL, ‘cause the link localhost:8000/admin/translations?local=it only serves to check if the json is read by the application – Dax Oct 15 '19 at 05:37

1 Answers1

1

Your configuration is correctly config/packages/sulu_core.yaml:

sulu_core:
    locales:
        de: Deutsch
        en: English
        it: Italian
    translations:
        - de
        - en
        - it

Then create a translations/admin.it.json

{
    "sulu_tag.tags": "Tags It"
}

Clear the cache then and go to your Profile change the System language from en to it.

See for translation keys the admin.en.json files in the https://github.com/sulu/sulu repository.

Alexander Schranz
  • 2,154
  • 2
  • 25
  • 42