urbantrout
(Harald Atteneder)
November 10, 2017, 10:21pm
1
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
urbantrout
(Harald Atteneder)
November 13, 2017, 9:20am
3
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
Nezaniel
(Bernhard Schmitt)
November 13, 2017, 10:06am
5
Hey there,
Did you declare neos/nodetypes as a composer dependency of your package? Also, which Neos / Flow versions are you using?
urbantrout
(Harald Atteneder)
November 13, 2017, 10:20am
6
@Nezaniel Yes, neos/nodetypes is a dependency in my site package’s composer.json.
"neos/nodetypes": "*",
neos/flow version is 4.2.3
jonnitto
(Jon Uhlmann)
November 14, 2017, 9:36am
7
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
urbantrout
(Harald Atteneder)
November 14, 2017, 9:49am
8
Nice. This solved my problem Thank you!
1 Like
jonnitto
(Jon Uhlmann)
November 14, 2017, 9:49am
9
Great! I’m glad I could help you.