On 24 Giu, 08:05, Tom Ptacnik <to...@tomor.cz> wrote:
> So if I need to get some variables in javascript from the app, you
> advice is to generate it into the DOM?
>
> Example: I need to detect which culture is set. Then i should generate
> <div id="culture" style="display:none;">en</div> into the DOM and then
> in the javascript read the value of the div by id?

If you just need the culture, you should get it from html tag. (in the
"lang" attribute)
Of course, you should before set it in html tag, but it's trivial:
just set it in layout.php

cheers
Massimiliano

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to