LanguageManager.php 469 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
<?php

/**
 * @file
 * Definition of Drupal\Core\Language\LanguageManager.
 */

namespace Drupal\Core\Language;

use Symfony\Component\HttpFoundation\Request;

/**
 * Ajl
 */
class LanguageManager {

  private $container;

19
  public function __construct(Request $request = NULL) {
20 21 22
    $this->request = $request;
  }

23
  public function getLanguage($type) {
24
    $language = language_types_initialize($type, array('request' => $this->request));
25 26 27 28
    return $language;
  }

}