Score:2

In the context of a multilingual site, what is considered "interface text" and what is "content"?

in flag

On the Language Selection and Detection configuration page (in the toolbar, Manage > Configuration > Regional and language > Languages > Selection and Detection), I see that I can detect and set "Interface text language" and "Content language" differently. But I don't see a clear definition of those terms anywhere.

I have a hardcoded heading within a node template:

<h2>{{ "Hello world"|t }}</h2>

This heading's text is translated to my "Interface text" language while the other content (node fields) is translated to "Content" language.

To me, it looks like "Interface text" is any text that's passed through t() or uses the trans or t filters in twig while "Content" is just content within a content entity, e.g node, media, taxonomy term, etc fields.

What is "interface" and what is "content" in this [multilingual] context?

4uk4 avatar
cn flag
If you want both to match then don't configure a content language detection method. Besides interface and content there is a third translation module for config, so you also see a different language for options list fields for example. This can be even more annoying seeing field content translated differently. Config is translated in the same language as interface.
sonfd avatar
in flag
Thanks @4k4 - I'm really just trying to get a clear definition of what is considered "interface text" and what is considered "content". I removed the second half of the question because I see that is opening a can of worms.
cn flag
I think you’ve already covered it - interface translations are the ones that go through `t`, content translations are content entity field translations
sonfd avatar
in flag
Alright, thanks. That's what I thought, but I was struggling with "Interface text" being the label for that and I couldn't find a clear definition anywhere.
sonfd avatar
in flag
@4k4 - if you want to post a version of your comment as an answer, I'll accept it. Otherwise, I'll add one.
liquidcms avatar
us flag
I've been struggling with this as well and I had thought the definition of this would have been something a bit more functional. I had hoped that interface was simple admin/editor actions like Edit tab, Apply button so that a person could work on a site in their preferred language without understanding the content. But this, sadly, isn't what Drupal is doing. Certainly confusing if it is as you have said. I see "content" of my node and the text fields use content translation; except date fields don't. And field labels don't. Sort of useless.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.