Adds a label to the labels collection

@param string $text
@param bool $isPlain
@param string $lang

@return void
7137
public function addLabel($text, $isPlain = true, $lang = 'en')
    {
        $this->labels[$lang] = new Label($text, $this->getLocaleKey(), $isPlain, $lang, $this->name);
    }
56963
public function setText(string $text): void
    {
        $this->text = $text;

        if ( ! is_null($this->encode)) {
            $text = $this->encode->convert($text);

            // remember the conversion
            $this->convertedText = $text;
        }
    }
700060
public function addMessage($message, $label = 'info', $isString = true)
    {
        if (!is_string($message)) {
            $message = $this->getDataFormatter()->formatVar($message);
            $isString = false;
        }
        $this->messages[] = array(
            'message' => $message,
            'is_string' => $isString,
            'label' => $label,
            'time' => microtime(true)
        );
    }
1373275
static void tag(StringBuilder sb, String color, String text) {
        sb.append("<span class='label label");
        if (color != null) {
            sb.append("-").append(color);
        }
        String classText = text.replace(' ', '_');
        sb.append(" l-").append(classText).append("'>").append(text).append("</span>");
    }
632512
public function setLang($lang = '')
    {
        if (gettype($lang) === 'string') {
            $this->lang = $lang;
        } else {
            $msg = "The lang argument must be a string, '" . gettype($lang) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
863490
private function tag_text($text)
	{
		if($this->current_tag instanceof Node_Container_Tag)
		{
			$accepted_children = $this->bbcodes[$this->current_tag->tag()]->accepted_children();

			if(!empty($accepted_children) && !in_array('text_node', $accepted_children))
				return;
		}

		$this->current_tag->add_child(new Node_Text($text));
	}
238397
public function addText($text) {
      if (is_string($text))
          $text = new BaMLText($text);
      if (!($text instanceof BaMLText)) 
          throw new \CatapultApiException("You can only add type BaMLAttribute or array..");
      
      $this->text = $this->text . $text;
    }
1081841
public void SetTagType(String lang){
		if(lang.equals("en"))
			this.labels = factory.buildLabelAlphabet("label-en");
		else if(lang.equals("cn"))
			this.labels = factory.DefaultLabelAlphabet();
	}
1117137
private function addTranslatable($text)
    {
        if (strlen($text) > 1 && !isset($this->translatables[$text])) {
            $this->translatables[$text] = '';
        }
    }
221890
public function setIsBold ( $isBold ) {
        if ( $isBold === true ) {
            $this->_isBold = true;
        } else {
            $this->_isBold = false;
        }
    }
596513
public void label(String labelText, int index)
	{
		if (labelMap.containsKey(labelText)) throw new IllegalArgumentException(
			"Label \"" + labelText + "\" already exists.");

		if (labelMap.containsValue(index)) throw new IllegalArgumentException(
			"Index \"" + index + "\" already has a label.");

		labelMap.put(labelText, index);
	}
575225
public function iFillInTheRichTextEditorWith($label, $text) {
    /** @var \Behat\Mink\Element\NodeElement $field */
    $field = $this->getSession()->getPage()->findField($label);

    if (NULL === $field) {
      throw new \Exception(sprintf('Field "%s" not found.', $label));
    }

    $args_as_js_object = json_encode([
      'ckeditor_instance_id' => $field->getAttribute('id'),
      'value' => $text,
    ]);

    $this->getSession()->executeScript(
      "args = {$args_as_js_object};" .
      "CKEDITOR.instances[args.ckeditor_instance_id].setData(args.value);"
    );
  }
1228064
public static function _text($text, $values = array()) {
		_t($text, static::getDomain(), is_array($values) ? $values : array_slice(func_get_args(), 1));
	}
916654
public function setLabel($label)
    {
        parent::setLabel($label);
        if (isset($this->token['captcha'])) {
            if ((strpos($this->token['captcha'], '<img') === false) &&
                ((strpos($this->token['captcha'], ' + ') !== false) ||
                 (strpos($this->token['captcha'], ' - ') !== false) ||
                 (strpos($this->token['captcha'], ' * ') !== false) ||
                 (strpos($this->token['captcha'], ' / ') !== false))) {
                $this->label = $this->label . '(' .
                    str_replace([' * ', ' / '], [' &#215; ', ' &#247; '], $this->token['captcha'] .')');
            } else {
                $this->label = $this->label . $this->token['captcha'];
            }
        }
        return $this;
    }
226861
public function setLanguage($lang)
    {
        $this->clearCachedValueIf($this->lang != $lang);
        $this->lang = $lang;
    }
1153112
public function setLanguage($lang = null)
    {
        $this->_iLanguage = (int) $lang;
        // reset
        $this->_sViewTable = false;
    }
1133370
function addTextLabel(root, node) {
  var domNode = root.append("text");

  var lines = processEscapeSequences(node.label).split("\n");
  for (var i = 0; i < lines.length; i++) {
    domNode.append("tspan")
      .attr("xml:space", "preserve")
      .attr("dy", "1em")
      .attr("x", "1")
      .text(lines[i]);
  }

  util.applyStyle(domNode, node.labelStyle);

  return domNode;
}