Back to Index / back to README
When you define a new cropVariant with
\JosefGlatz\CropVariantsBuilder\CropVariant::create()
the passed
parameter is used as the cropVariant name.
The given name is also used to retrieve a meaningful label (and translation) for the TYPO3 backend automatically.
We use the cropVariant name md
in the following example
(\JosefGlatz\CropVariantsBuilder\CropVariant::create('md')
).
Either the supplied XLF file is used or the XLF file in the configured extension is used depending on your extension configuration settings of ext:cropvariantsbuilder.
A label
LLL:EXT:yourconfiguredExtensionName/Resources/Private/Language/locallang.xlf:crop_variants.md.label
is used as final string.
Make sure to add the proper translation string to the xlf file!
A label
LLL:EXT:cropvariantsbuilder/Resources/Private/Language/locallang.xlf:crop_variants.md.label
is used as final string.
This returns the label "Medium (md) ⇡". This extension ships a label for that.
As you can see, everytime you can not rely on the shipped translation strings of ext:cropvariants!
If you do not want to use XLF files for translating labels at all or you want
to set a custom LLL:EXT:whateverforthislabel/...
label then you can use the
method setTitle()
of the CropVariant class.
Please see shipped locallang.xlf for details. If you need more common labels, please provide a pull request or create an issue!