{"issue":{"created_at":"2011-11-29T07:19:25Z","state":"open","updated_at":"2011-11-29T07:19:30Z","user":{"gravatar_id":"7ca7554b516e2f5476d823cc2eca706a","id":734684,"url":"https://api.github.com/users/LeoUnglaub","avatar_url":"https://secure.gravatar.com/avatar/7ca7554b516e2f5476d823cc2eca706a?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"LeoUnglaub"},"comments":5,"body":"Hallo Leo,\nich entwickle gerade ein Modul mit dem man Sprachfiles über das BE überschreiben kann. Quasi eine grafische Version der langconf.php. \n\nIch möchte aber trotzdem, dass die langconf.php noch nach meinen Änderungen eingelesen wird um das TYPOlight Prinzip beizubehalten. Um das zu bewerkstelligen bräuchte ich einen HOOK in der Methode loadLanguageFile(). Ich bräuchte den Hook an der durch einen Kommentar gekenzeichneten Stelle.\n\n```\nprotected function loadLanguageFile($strName, $strLanguage=false)\n{\n\tif (!$strLanguage)\n\t{\n\t\t$strLanguage = $GLOBALS['TL_LANGUAGE'];\n\t}\n\n\tforeach ($this->Config->getActiveModules() as $strModule)\n\t{\n\t\t$strFallback = sprintf('%s/system/modules/%s/languages/en/%s.php', TL_ROOT, $strModule, $strName);\n\n\t\tif (file_exists($strFallback))\n\t\t{\n\t\t\tinclude($strFallback);\n\t\t}\n\n\t\tif ($strLanguage == 'en')\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\n\t\t$strFile = sprintf('%s/system/modules/%s/languages/%s/%s.php', TL_ROOT, $strModule, $strLanguage, $strName);\n\n\t\tif (file_exists($strFile))\n\t\t{\n\t\t\tinclude($strFile);\n\t\t}\n\t}\n    \n    // der HOOK preLoadLanguageFile\n\n\tinclude(TL_ROOT . '/system/config/langconfig.php');\n}\n```\n\nIch hoffe das lässt sich in TL 2.7.6 integrieren, denn der HOOK wäre wichtig für mich. Das wäre sehr nett von dir.\nVielen Dank und viele Grüße\nLeo\n\n--- _Originally created on October 11th, 2009, at 02:04am (ID 1083)_","assignee":{"gravatar_id":"87d2e5aefadcb310f9155df28c2b3582","id":1192057,"url":"https://api.github.com/users/leofeyer","avatar_url":"https://secure.gravatar.com/avatar/87d2e5aefadcb310f9155df28c2b3582?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"leofeyer"},"id":2379664,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"labels":[{"name":"Feature","color":"4183c4","url":"https://api.github.com/repos/contao/test/labels/Feature"},{"name":"framework","color":"e6e6e6","url":"https://api.github.com/repos/contao/test/labels/framework"}],"number":1083,"title":"HOOK: preLoadLanguageFile","closed_at":null,"html_url":"https://github.com/contao/test/issues/1083","url":"https://api.github.com/repos/contao/test/issues/1083","milestone":{"created_at":"2011-11-29T05:26:41Z","state":"open","closed_issues":106,"due_on":null,"creator":{"gravatar_id":"87d2e5aefadcb310f9155df28c2b3582","id":1192057,"url":"https://api.github.com/users/leofeyer","avatar_url":"https://secure.gravatar.com/avatar/87d2e5aefadcb310f9155df28c2b3582?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"leofeyer"},"number":9,"description":"TYPOlight 2.8.0 (minor release)","title":"2.8.0","open_issues":1,"url":"https://api.github.com/repos/contao/test/milestones/9"}},"action":"created","comment":{"created_at":"2011-11-29T07:19:30Z","updated_at":"2011-11-29T07:19:30Z","user":{"gravatar_id":"256406243346b9253f8610fb1d1e05f6","id":1215373,"url":"https://api.github.com/users/importer","avatar_url":"https://secure.gravatar.com/avatar/256406243346b9253f8610fb1d1e05f6?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"importer"},"body":"Ups, sry. das ist noch uebrig vom debugging von mir... die Zuweisung muss logischerweise entfallen.\n\n```\n+foreach ($GLOBALS['TL_HOOKS']['loadLanguageFile'] as $callback)\n+{\n+    $this->import($callback[0]);\n+    $this->$callback[0]->$callback[1]($strName, $strLanguage);\n+}\n```\n\nSo isses richtig(er), gut dass wir hier nochmal drueber geredet haben. Viele Augen sehen eben mehr als zwei ;)\n\nZu deiner anderen Frage musst du leo fragen, wo er seine Aenderungen definiert/speichert/... Ich denke jedoch, dass die Aenderung permutativer Natur ist und somit immer wieder \"neu generiert\" werden muss. Daher gebe ich die Parameter 1:1 weiter, damit er sich genauso verhalten kann, wie die Ursprungsfunktion.\n\n--- _Originally created by xtra on October 13th, 2009, at 04:45pm_","id":2919053,"url":"https://api.github.com/repos/contao/test/issues/comments/2919053"}}