Context:

We're having different front pages (nodes) per language. They have to be technically different, because one is a page with certain paragraphs for a Special Offer and the other one is from a different content type (can't be the same entity here, still both should be the special case "front")

Problem:

Form System > Basic site settings allows to set different variables in UI:

  • Site name
  • Slogan
  • E-Mail
  • Default front page
  • Default 403
  • Default 404

Full form

and shows a "Translate system information" tab. But there only

  • Site name
  • Slogan

can be translated.

Translation form

This was a huge problem for us, so I simply tried to edit de/system.site.yml directly:

page:
  403: ''
  404: /search404
  front: /node/28

imported the config and hey, it works like a charm, just like we knew in Drupal 7. /de now deliveres a different page than /en. But that should be managable for site owners in the UI directly and not only for developers.

Something like this is also described here for example:
https://drupal.stackexchange.com/questions/188923/setting-the-default-fr...

Proposed solution

Expose all Basic site settings for translation in UI. Front page is a very special case and we should not assume it's always the identically same entity targeted!

Thank you!

Comments

Anybody created an issue. See original summary.

anybody’s picture

Component: system.module » configuration system
anybody’s picture

Issue summary: View changes
anybody’s picture

Should we better change the issue title to "Make all Basic site settings translatable in UI?"

anybody’s picture

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

jas1988’s picture

It worked by directly changing in files it should be available in UI !

anybody’s picture

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

lordzik’s picture

Hello,
i'm trying to understand how to set different "default page" per language but i need some really basic information about this :(

This was a huge problem for us, so I simply tried to edit de/system.site.yml directly
Can you explain exactly WHERE you put this file and how you import it? Does it work in Drupal 8.9.7?

btw how is this possible that such fundamental thing like different default page per language is still not available in /admin/config/system/site-information/translate/_langcode_/edit ??!

jas1988’s picture

@lordzik you need to put system.site.yml in your language folder of config directory and then import it, for example my sites first language is not english but we have seperate front-page for english language and separate for default language.

config_......../sync/language/en/system.site.yml

name: EnglishSiteName
slogan: ''
mail: example@en.com
page:
403: ''
404: ''
front: /example-en-front-page

Default language system.site.yml is found at below structure :

config_......../sync/system.site.yml

Site is in Drupal 8.9

simgui8’s picture

Here is a useful link to a suggestion from berdir:
https://drupal.stackexchange.com/questions/222750/different-front-page-p...

@see the 4 years later update

Works for me

lordzik’s picture

@jas1988
I created a file language/en/system.site.yml - but how can i import it? Should i do that in en/admin/config/development/configuration ? If yes, then something is wrong because all i see is this:
"There are no configuration changes to import." :(

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

ruuds’s picture

StatusFileSize
new1.61 KB

Adding a form_element_class for the path and email schema type makes the fields translatable. See the attached patch.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.

remco hoeneveld’s picture

Reroll for drupal 11.

anybody’s picture

@ruuds thanks - maybe you could create a MR instead to push this forward?