function PoHeader::__construct

Same name in other branches
  1. 9 core/lib/Drupal/Component/Gettext/PoHeader.php \Drupal\Component\Gettext\PoHeader::__construct()
  2. 8.9.x core/lib/Drupal/Component/Gettext/PoHeader.php \Drupal\Component\Gettext\PoHeader::__construct()
  3. 10 core/lib/Drupal/Component/Gettext/PoHeader.php \Drupal\Component\Gettext\PoHeader::__construct()

Constructor, creates a PoHeader with default values.

Parameters

string $langcode: Language code.

File

core/lib/Drupal/Component/Gettext/PoHeader.php, line 73

Class

PoHeader
Gettext PO header handler.

Namespace

Drupal\Component\Gettext

Code

public function __construct($langcode = NULL) {
    $this->langcode = $langcode;
    // Ignore errors when run during site installation before
    // date_default_timezone_set() is called.
    $this->poDate = @date("Y-m-d H:iO");
    $this->pluralForms = 'nplurals=2; plural=(n > 1);';
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.