You are here

protected function WebformConfigProcessor::isTranslatable in Translation Management Tool 8

Returns whether the value should be treated as translatable.

If the value only consists of a token then treat it as untranslatable.

Parameters

string $value: The configuration value.

Return value

bool TRUE if it is translatable, FALSE otherwise.

2 calls to WebformConfigProcessor::isTranslatable()
WebformConfigProcessor::convertElementsToData in sources/tmgmt_config/src/WebformConfigProcessor.php
Converts the webform elements structure to translatable data.
WebformConfigProcessor::extractTranslatables in sources/tmgmt_config/src/WebformConfigProcessor.php

File

sources/tmgmt_config/src/WebformConfigProcessor.php, line 141

Class

WebformConfigProcessor

Namespace

Drupal\tmgmt_config

Code

protected function isTranslatable($value) {
  $translatable = TRUE;
  if (preg_match('/^\\[[a-z-_:]+\\]$/', $value)) {
    $translatable = FALSE;
  }
  return $translatable;
}