In a recent Drupal 8 project, we dealed with a multilingual translation issue: we need to translate the usual "View more" text on the Content: Link to Content field in Views.

After doing some research, we found a workaround like this:

1. Instead of using Content: Link to content, let's add two fields: Content: Path and Global: Custom text.

Note: the Content: Path field provides us a corresponding URL alias for each language.

2. On Global: Custom text, please enter:

<a href="{{ path }}">{% trans %} View more {% endtrans %}</a>

3. Now the text "View more" will be available in User interface translation tool under Configuration - Regional and Languages

Note: to translate that text into a given language, you must browse the User interface translation in that given language.

Subscribe to our mailing list

* indicates required