bernhard
(Bernhard Witz)
May 17, 2018, 3:24pm
1
Where can I put the translations for the forms in Neos? For example for “submit” or validation errors.
In my Settings.yaml I have the following code:
Form:
presets:
default:
formElementTypes:
'Neos.Form:Base':
renderingOptions:
translationPackage: 'My.Package'
Where can I put my translation files to overwrite the original texts?
I use the amazing plugin neos/forms. Probably the texts are located in the file Main.xlf. Here is an example with a translation file:
.. _translating-forms:
Translating Forms
=================
If a form has been set up, all elements will use the labels, placeholders and so forth as configured.
To have the form translated depending on the current locale, you need to configure a package to load
the translations from and add the translations as XLIFF files.
Configuration
-------------
The package to load the translations from is configured in the form preset being used. The simplest
way to configure it is this:
.. code-block:: yaml
Neos:
Form:
presets:
This file has been truncated. show original
ReneC
(Rene Rehme)
May 22, 2018, 9:14am
2
Your settings.yaml looks good.
Your question: You have to use the same directory structure as in the neos/form package.
See here:
So if your package named “My.Package” and you want to override (for example) the german translations you have to add the translation files for German langauge in your package like:
My.Package/Resources/Private/Translations/de/Main.xlf