Title not translated when saving node translation

Created on 20 March 2019, about 6 years ago
Updated 3 February 2025, 4 months ago

Hi there,

I have two languages on my site. For a node type I use this code to create the title automatically:

<?php
if ($language == 'en') {
echo ('Business Location');
} elseif ($language == 'de') {
echo ('Wirtschaftsstandort');
}

The code works well when I save the node in the source language (German). When saving the node I see the German title 'Wirtschaftsstandort [token]'. Switching language to English it correctly shows 'Business Location [token]'.

But: When I translate the German node and save the English version, I get the German title ('Wirtschaftsstandort [token]').

Does someone see what I am missing here?

💬 Support request
Status

Closed: outdated

Version

1.4

Component

Code

Created by

🇩🇪Germany ThuleNB

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024