protected function LayoutParagraphsBuilder::translationWarning in Layout Paragraphs 2.0.x
Builds a translation warning message.
Return value
\Drupal\Core\StringTranslation\TranslatableMarkup The translation warning.
1 call to LayoutParagraphsBuilder::translationWarning()
- LayoutParagraphsBuilder::preRender in src/
Element/ LayoutParagraphsBuilder.php - Pre-render callback: Renders the UI.
File
- src/
Element/ LayoutParagraphsBuilder.php, line 502
Class
- LayoutParagraphsBuilder
- Defines a render element for building the Layout Builder UI.
Namespace
Drupal\layout_paragraphs\ElementCode
protected function translationWarning() {
if ($this
->isTranslating()) {
if ($this
->supportsAsymmetricTranslations()) {
return $this
->t('You are in translation mode. Changes will only affect the current language.');
}
else {
return $this
->t('You are in translation mode. You cannot add or remove items while translating. Reordering items will affect all languages.');
}
}
}