[SOLVED] Override translations of other packages

I am not able to override or extend the properties of NodeTypes/Image of the Neos.NodeTypes package.

Here is the content of My.Package/Resources/Private/Translations/en/NodeTypes/Image.xlf:

<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
	<file original="NodeTypes/Image" product-name="Neos.NodeTypes" datatype="plaintext" source-language="en">
		<body>
			<trans-unit id="properties.image" xml:space="preserve">
				<source>Alternative Translation (Image)</source>
			</trans-unit>
		</body>
	</file>
</xliff>

What am I doing wrong?

Hi Harald!

Add 'Neos.NodeTypes:Image‘ in your Sites NodeTypes.yaml and define the translation variable like

Your.Site:Main:myownimagetrans

Thanks for the reply!
I already added the Image to my NodeTypes.yaml, because I added some custom properties.

'Neos.NodeTypes:Image':
  properties:
    ....

Where should I put the translation? (Main.xlf and not NodeTypes/Image.xlf?)
And what exactly is the id for lets say properties.image for the Neos.NodeTypes/Image NodeType?

Please paste your full .yaml

Hey there,

Did you declare neos/nodetypes as a composer dependency of your package? Also, which Neos / Flow versions are you using?

@Nezaniel Yes, neos/nodetypes is a dependency in my site package’s composer.json.

"neos/nodetypes": "*",

neos/flow version is 4.2.3

You can override labels in the Backend like that:

Foo.Bar:Element
  properties:
    image:
      ui:
        label: 'Foo.Bar:NodeTypes.Element:properties.image'

Like that, the entry properties.image from the file Resources/Private/Translations/LANGUAGE_CODE/NodeTypes/Element.xlf from the package Foo.Bar gets included

<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
    <file original="" product-name="Foo.Bar" source-language="en" datatype="plaintext">
        <body>
            <trans-unit id="properties.image" xml:space="preserve">
                <source>Your own label</source>
            </trans-unit>
        </body>
    </file>
</xliff>
1 Like

Nice. This solved my problem :wink: Thank you!

1 Like

Great! I’m glad I could help you.