0

I am new do Drupal. I am testing out Drupal 8's multilingual capabilities.

I created a new content type with a field of type List (text) and a field of type Text. I have provided a translation for the text field, and switching language works fine when displaying it in a view. I have also entered a translation for the list field values, but those do not change when changing language. How do I get them to display in the selected language? I did set the Rendering Language to "Interface text language selected for the page". I don't see an option to make field values render in the selected language, but it's working fine for text fields. I cannot figure out why it does not work for list values.

2 Answers 2

1

You can refer the following tutorial for the same, it's well explained.

https://www.ostraining.com/blog/drupal/d8-multi-lingual/

https://www.drupal.org/docs/8/multilingual/choosing-and-installing-multilingual-modules

1
  • 1
    Thanks, that is a useful walk-through (although it did not answer my particular question).
    – Jimmy
    Commented Nov 23, 2016 at 14:03
0

Oh! After adding a translation for a list value, you have to edit (and save) one of the content entries containing the list, and after that the translations show up.

2
  • For me it took a whole lot of cache clearing. Also, I have found no way to translate the key since I'm using this on my Manage Display > format to output some HTML. Someone else might be trying to do this as well and thought I'd mention it.
    – SuperTony
    Commented Jul 11, 2017 at 20:52
  • Translating the key would not be a good idea. The key is like a "machine name" and it is used in queries, like Views. If you are filtering based on the values in the list, you want your query to always use the same keys, and have Drupal translate the values based on context. Commented Feb 1, 2022 at 17:56

Your Answer

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

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