Configuration translation from code documentation either does not exist or is obsolete

Created on 11 February 2016, almost 9 years ago
Updated 25 November 2023, 12 months ago

Problem/Motivation

I am trying to get (and perhaps even set) the translation of a configuration entity. I do not know how, the ConfigFactory doesn't have anything where I could set a language, no method, no argument, nothing. The ConfigFactoryInterface is not implemented by any other class. All the information provided by https://www.drupal.org/node/1928898 points to nonexisting things: setLanguage method on ConfigFactory, language.config. prefix objects (I am pretty sure that's just language. prefix because of what I see in LanguageConfigCollectionNameTrait ). #2219499: Generalize language config override responsibility removed setLanguage from ConfigFactory almost two years ago and left no change record behind. It has this to say in API changes "Active language for configuration is now set on the LanguageManager".

Proposed resolution

Is LanguageManagerInterface::setConfigOverrideLanguage the one to call, then?

  1. Fix https://www.drupal.org/node/1928898
  2. Add at least a @link to that handbook page but also if possible a code sample in ConfigFactory::get would be nice

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Closed: outdated

Version

9.5

Component
Language system 

Last updated about 20 hours ago

  • Maintained by
  • 🇩🇪Germany @sun
Created by

🇨🇦Canada chx

Live updates comments and jobs are added and updated live.
  • D8MI

    (Drupal 8 Multilingual Initiative) is the tag used by the multilingual initiative to mark core issues (and some contributed module issues). For versions other than Drupal 8, use the i18n (Internationalization) tag on issues which involve or affect multilingual / multinational support. That is preferred over Translation.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024