0

I've searched high and low but can't seem to find any question that has the same problem. We're experiencing blocks that have content that is not being translated. For example, a custom block that has a simple translatable string and is being translated into a different language, it will simply always show the source language. What's up with that?

$build['test_content']['#markup'] = $this->t('Test NL'); 

Edit: For the record; we have translated this string into the target language but still doesn't show up on the corresponding language.

1
  • I'm so sorry, apparently I'm having a bad day. Drupal 8's translation system seems a bit crooked on some points, so much that every translation anomaly seems like a restriction or bug in D8 core. Apparently, I've been hitting my own stupidity at this point, the translations were entered the wrong way around. I'll vote to close this issue.
    – Ambidex
    Commented Mar 23, 2017 at 12:23

1 Answer 1

1

You need to navigate to admin/config/regional/translate. Try to search for "Test NL" in the input field. It will give you the string on the left side along with a text-field to the right. Enter the translation for the "Test NL" in the text field. and click save translations.

You are done. Clear the cache and check the interface.

1
  • I'm sorry for not being thorough, I already translated the string in the interface translation page. Therefor it should translate to the target language. I'll edit my original question to add this missing information.
    – Ambidex
    Commented Mar 23, 2017 at 12:14

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