Non-editorial text is translated using message catalogs in the XLIFF format. These are files saved inside your package. It allows you to translate text in your YAML/Fusion/Fluid/AFX files. The XLIFF format facilitates collaboration with external translation programs and services.
We can tell Neos to load the XLIFF file by defining an inclusion path in the Settings.yaml of your package.
In the following example we include will add all files within the packages Resources/Private/Translations/[DIMENSION_NAME]/NodeTypes folder. [DIMENSION_NAME] is the value of the content dimension "language", e.g. en, fr or de.
If the translation file is not available, the next possible file will be used according to the fallback rules.
Let's say we want to create a news teaser which has a "more" button, which should be translated. Let's create a source language file Resources/Private/Translations/en/NodeTypes/Content/NewsTeaser.xlf
To give you a full example, this is how the whole teaser could look like. In our example the NewsTeaser finds the latest News and shows a teaser for that.