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

Created on 11 February 2016, over 8 years ago
Updated 25 November 2023, 7 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 17 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.69.0 2024