Created
December 24, 2014 12:41
-
-
Save sbruggmann/7e6e234312558764f44d to your computer and use it in GitHub Desktop.
Get current Language in TYPO3 Neos Controller
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace My\Custom\Controller; | |
use TYPO3\Flow\Annotations as Flow; | |
class StandardController extends \TYPO3\Flow\Mvc\Controller\ActionController { | |
/** | |
* @Flow\Inject | |
* @var \TYPO3\Flow\I18n\Service | |
*/ | |
protected $i18nService; | |
/** | |
* @return void | |
*/ | |
public function indexAction() { | |
exit( (string)$this->i18nService->getConfiguration()->getCurrentLocale() ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment