Hi, I use [node:source:nid] tokens to generate automatic node titles in a multilanguage-web-site.

As long a node has already a translation, everything works fine.
But, if there is no translation, the node-title is empty.
Interesting part: Even if the "empty" token isn't part of the returned value, the node title is empty.

<?php
$var_pro
= '';
$var_sourcenid = [node:source:nid]; 'breaks the node title when there is no translation
$var_lang = [node:language];
if ($var_lang == '
fr') {
    $var_pro = '
Projet';
} elseif ($var_lang == '
en') {
    $var_pro = '
Project';
} else {
    $var_pro = '
Projekt';
}
$title = $var_pro . '
#10';
return $title;
?>

I tried to proof if the token exists (!empty ....) - but always the node title is empty. Can anyone help?

Comments

Did you have any luck with this?

I am sorry, but no ...
I think, the only chance is, to use php node load instead of tokens.
With php you can load the node and than proof variables like $node->language