You are here

public function GoToDefaultLanguage::go in String Overrides 8

Redirect user to admin form for default language.

Return value

\Symfony\Component\HttpFoundation\RedirectResponse Symfony redirect.

1 string reference to 'GoToDefaultLanguage::go'
stringoverrides.routing.yml in ./stringoverrides.routing.yml
stringoverrides.routing.yml

File

src/Controllers/GoToDefaultLanguage.php, line 20

Class

GoToDefaultLanguage
Class GoToDefaultLanguage.

Namespace

Drupal\stringoverrides\Controllers

Code

public function go() {
  $language = \Drupal::languageManager()
    ->getDefaultLanguage();
  return $this
    ->redirect('stringoverrides.translations_form', [
    'language' => $language
      ->getId(),
  ]);
}