3

In Drupal 8, my default language is English, but I also have German. How can I create a content item that will only be available for German, and not in English? In other words, how do I created "translated only" content?

When I add new content, I can use the Language select box, but it still creates content available in the English language.

4
  • That's a good question! Can you maybe add some information about how you plan the language switch should work? Will it always only lead to the front page of your site? Or do you plan to have no language switch at all?
    – leymannx
    Dec 26, 2016 at 22:14
  • There will be a language switch, but it'll only go to the front page of the site.
    – croceldon
    Dec 26, 2016 at 22:43
  • OK Let's dig a little bit deeper. What's the exact problem? That the German content appears in the English menu? Maybe you simply should build two entirely different menus. One for each language. You'll have a custom language switcher right? So the English version of the German content can never get accessed at all. Maybe you first build that custom switcher, do you have it already working?
    – leymannx
    Dec 26, 2016 at 23:29
  • @leymannx - good idea about a different menu for each language. There won't be an English version if I can figure out how to do this
    – croceldon
    Dec 27, 2016 at 13:03

2 Answers 2

1

It used to take several contributed modules to make even a small multi-lingual Drupal 7 site. Now, you can translate everything using just the Drupal 8 core.

Step 1: Enable the translation modules

You need to enable these four core Drupal modules in order to translate your site. enter image description here

Step 2: Translate the Drupal core

First, let's translate of the core language inside the Drupal. In this example, I'm going to add Spanish as an option on my site:

  • Go to Configuration > Languages

  • Click "Add language"

  • Choose your language and click "Add language". enter image description here Click on the percentage area, under "Interface Translation". enter image description here You'll be able to search for and manually translate all the language strings in here: enter image description here Step 3: Translate your own site set-up

  • Go to Structure > Content types, you'll see a "Translate" option for your content types: enter image description here

  • Inside the next screen, you'll see similar "Translate" links for all your fields: enter image description here

Step 4: Add content

Now we can add content to your Drupal site.

  • Go to Configuration > Content language and translation.
  • Click the box next to "Content":

enter image description here

Note: This is an important step as you can set a specific translation for your content type. That means, the content type default language will be set to a particular language(like German).

enter image description here

After this step, all content of "Biography" type will be by default translated to german.

1
  • 1
    This really is a nice step-by-step but unfortunately it doesn't answer OP's question as he's asking about language-exclusiveness.
    – leymannx
    Dec 26, 2016 at 22:12
0

In your node type multilingual settings, you can switch to fixed language. (Sorry for my short answer, I'm using my phone)

3
  • Hmm. In the content type edit page, I see a "Language settings" section, and it lets me change the default language for new content. I see no option for "fixed language".
    – croceldon
    Dec 26, 2016 at 17:55
  • Between, which Drupal version are you using ? 7? 8? Dec 26, 2016 at 18:00
  • I'm using Drupal 8
    – croceldon
    Dec 26, 2016 at 19:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.