I found this: http://www.symfony-zone.com/wordpress/2008/12/13/use-routing-to-server-localized-and-dynamic-javascript/
But I saw that it is already built into Symfony using use_dynamic_javascript () AssetHelper.
I can not find any documentation for using this assistant. Any examples, links, or anything that might help? Thanks.
I ended up using this method.
Maybe this can help: howto use use_dynamic_javascript helper