Best practice for displaying translated titles in Directus collections?

Hi everyone :waving_hand:

In my Directus setup, I use a translations relation for multilingual content.
That means all key fields like title, slug, description, etc. are stored not in the main collection, but in a related translations collection (e.g. one record per language).

For example, in a categories collection I have a field translations (O2M relation), and each translation holds:

  • language
  • title
  • slug
  • description

The issue

In the list view, I want to display the title of the item in the default language (e.g. German).

While I can access translations[0].title, the column is still labeled “Translations” in the list view. This makes it hard to quickly identify entries — especially if nearly all relevant content is stored in the translation relation.

Here’s a screenshot of the current edit form view:

:camera_with_flash: And this is how it appears in the list view:


:light_bulb: My questions:

  • Can I rename the column label in the list view from Translations to Title (or whatever field I’m showing from within the relation)?
  • What’s the best way to show the title in the default language directly in the list view?
    • Create a computed field like display_title with a filter on translations.language == 'de'?
    • Use a hook to sync the German title into a separate field like title_de?
  • Are there any recommended patterns for multilingual relational content like this?
  • Any improvements planned for displaying fields from relations more clearly in the UI?

Workaround I’m considering

I could add a display_title field and populate it from the German translation using a hook. But this feels redundant, since the data already exists in the relation.

It would be great to have a cleaner approach, especially for sites where most content is structured this way.


Related Feature

This seems somewhat related to the issue where Super Header doesn’t pull from translation fields.


Any feedback, advice or shared experiences would be super helpful! :raising_hands:

2 Answers

2

Great question, I also want to show default lang as translation field easily.

I remember Bryant made a video a long time ago explaining how to implement translations and how to make the list view depend on either the user’s default language or the system language, but unfortunately I haven’t been able to find it.

Recently, I tried an extension called Super Table, and it looks very promising. It includes the feature you’re asking for, which lets you rename the field shown in the list view.

In some cases, I also use the built-in field name translation feature to display the field name more clearly in the relations/translations fields.

In my opinion, that approach is a bit better than creating a hook, adding a new field, and building extra logic around it.