Ibexa DXP Discussions

Community discussion forum for developers working with Ibexa DXP

Add second language

I am working on a eZPlatform 2.5 project which is used most likely as an API, so there is no frontend.
All ezplatform.yml configuration are the default ones, so with a single language => eng-GB.

However, in the admin CMS there are 2 languages (Admin -> Languages): English and German.

I want to be able to edit content for each of this languages, but at the moment, when I click on ‘Edit’ and choose the second language (German), the Draft editor opens, the the fields are readonly and there’s a notification in the top that says: You cannot preview this translation: there is no site available for this language. Please contact the website administrator.

When trying to edit content in the deafult language (English), everything is fine.

In order to fix this, I read the documentation and tried the following configuration in the ezplatform.yml:

ezpublish:
   siteaccess:
      list: [site_ger, site_eng]
      groups:
         site_group: [site_ger, site_eng]
      default_siteaccess: site_ger

   admin_group:
      languages: [ger-DE, eng-GB]
   site_ger:
      languages: [ger-DE]
   site_eng:
      languages: [eng-GB]

Using these configuration, when trying to edit the content in German, the notification (“there is no site available for this language.”) is gone, but the fields are still readonly and since some of them are required, I cannot even publish/update the content.

Can someone confirm that my configurations are valid and if there are still additional steps to do?

1 Like

Hallo @spidey,
The configuration for site_ger and site_eng sounds good. But those are your frontend siteaccesses.
for the backend you still miss the admin backend siteaccess configuration. It should be similar to below example:

ezpublish:
    siteaccess:
        list: [site_ger, site_eng, admin]
        groups:
            site_group: [site_ger, site_eng]
            # WARNING: Do not remove or rename this group.
            admin_group: [ admin ]

Now the important configuration for the backend and frontend languages:

    system:
        admin_group:
            # System languages. Note that by default, content, content types, and other data are in eng-GB locale,
            # so removing eng-GB from this list may lead to errors or content not being shown, unless you change
            # all eng-GB data to other locales first.
            # For admin this needs to contain all languages you want to translate content to on the given repository.
            languages: [ger-DE,eng-GB]
        site_ger:
           languages: [ger-DE]
        site_eng:
           languages: [eng-GB]

Check this Dokument to configure the “tree_root.location_id”: https://doc.ibexa.co/en/latest/guide/multisite/#configuration-example it can resolve the preview message you get.

2 Likes

Thanks for your reply @da_real

@spidey You should check this link https://doc.ibexa.co/en/latest/guide/multisite/#configuration-example it will defiantly helps you a lot. :slightly_smiling_face:

1 Like