Created
February 14, 2014 17:03
-
-
Save webmozart/9004861 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
function createTranslator(ResourceLocatorInterface $locator) { | |
$translator = new Translator('en'); | |
// add project specific resource | |
$translator->addResource('xlf', __DIR__.'/translations/en.xlf'); | |
// add all resources registered with the locator | |
$translator->consumeResources($locator); | |
return $translator; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment