4

How is this possible and how can I programmatically set the translations for my field(s)? You can load language overrides with ConfigurableLanguageManager::getLanguageConfigOverride, set values and save: \Drupal::languageManager()->getLanguageConfigOverride('fr', 'field.storage.node.field_example') ->set($key, $value) ->save();


2

Drupal multilingual features are very versatile and can cover most if not all cases. It is still a fairly complex feature and it is necessary to understand some concepts before you know how to configure everything to satisfy a particular need. The most important concept to understand in your case is the two-part nature of the multilingual system. One part ...


2

A simple solution in such cases would be to remove the language switcher and provide for translated content only modal links: <a class="use-ajax" data-dialog-type="modal" data-dialog-options="{&quot;width&quot;:800}" href="/fr/node/1">French version</a> You could add the links to the node, in a template or preprocess hook. Or create a ...


1

The Views list is a config entity list and these are listed override free: ConfigEntityListBuilder::load public function load() { $entity_ids = $this->getEntityIds(); $entities = $this->storage->loadMultipleOverrideFree($entity_ids); // Sort the entities using the entity class's sort() method. // See \Drupal\Core\Config\Entity\...


1

I was able to reproduce your issue in a fresh Drupal 8.7.5 installation. I reported the issue in Drupal core issue tracker. Also, here are a screenshot in which French Views names are displayed in an English interface:


1

Just to add to prkos's excellent accepted answer, I found that once I configured my website according to his instructions, if I really wanted to let end users use /fr/ language path prefixes, thereby making pages accessible without full-site switching at paths like /fr/node/1, I could do so via the following .htaccess / mod_rewrite rule: RewriteRule "^fr/(.*...


1

You can just call getTranslation like this: $node_translation = $node->getTranslation('LANGCODE');


1

Use /admin/config/regional/language/detection to set how language is detected. Add the language switcher module someplace to let a user change language. I find that when I switch a language, menu items adjust to the current language. So create the menu item to /somelink and change my language to Japanese, change the link to /ja/somelink when the menu ...


Only top voted, non community-wiki answers of a minimum length are eligible