translation - translate page with symfony 3 -
i want translate web
pages using symfony3
. have dropdown
list of countries , , dropdown
list of language , when user select his/her country, list of languages changes (displays languages country can speak). problem here : how can affect value of selected option (which represent language , en | fr | jp | tr etc ) '_locale' ?? have tried :
var val = field.options[field.selectedindex].value; option1.setattribute('data-href',"{{ path(app.request.get('_route'), app.request.get('_route_params')|merge({'_locale': 'val' })) }}");
the 'val' read string. want affect variable. how can please ?
ps: code not complete here because doesn't matter
Comments
Post a Comment