Skip to content

Commit

Permalink
use function to load translator, so if content change, translator can…
Browse files Browse the repository at this point in the history
… be reloaded
  • Loading branch information
Gladhon committed Sep 5, 2011
1 parent 7bb476c commit 38f8f59
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Listener/ResponseListener.php
Expand Up @@ -88,11 +88,12 @@ protected function injectScripts(Response $response)

$script= <<<HTML
<script type="text/javascript">
Ext.onReady(function() {
Ext.onReady(knpInitTranslator);
knpInitTranslator(){
new Knp.Translator({
url: '%s'
});
});
});
}
</script>
HTML;
$scripts .= sprintf($script, $this->router->generate('knplabs_translator_put'))."\n";
Expand Down

0 comments on commit 38f8f59

Please sign in to comment.