Fix the translation path.

This commit is contained in:
Tim Schumacher 2014-09-21 19:06:28 +02:00
parent eae1170c8c
commit 0f1e587c65

View file

@ -24,7 +24,9 @@ class DateTranslator {
if ($lang == '') { if ($lang == '') {
throw new \BadMethodCallException('Language is missing'); throw new \BadMethodCallException('Language is missing');
} }
$dir_iterator = new \RecursiveDirectoryIterator("translations");
$translations_path = realpath(__DIR__ . '/../../../translations');
$dir_iterator = new \RecursiveDirectoryIterator($translations_path);
$iterator = new \RecursiveIteratorIterator($dir_iterator, \RecursiveIteratorIterator::SELF_FIRST); $iterator = new \RecursiveIteratorIterator($dir_iterator, \RecursiveIteratorIterator::SELF_FIRST);
foreach ($iterator as $file) { foreach ($iterator as $file) {