I work a multi-localization project using Symfony2 , and i separate ( CSS/Images ) on different folder based on current user local.
Folder Structure Ex:
Resources\
public\
css\
ar\
home.css
en\
home.css
**Now i need the Assetic to render the correct home.CSS file based on current user local {ar | en} without loosing twig and filters functionality **
Example - This not work :
{% stylesheets
'bundles/atcopcore/css/{ app.request.locale }/home.css' filter='cssrewrite'
%}
<link rel="stylesheet" href="{{ asset_url }}" />
Note : I want to get advantage of css compine and this can't be done if i do the following :
<link rel="stylesheet" href="{{ asset('css/' ~ app.request.locale ~ '/home.css') }}" />
How i can do this ...
i found a link could be usefull , but i think there is more professional way to do this.
How to embed stylesheets with Assetic based on a value in the session
Please , Any suggestions ?
<link rel="stylesheet" href="{{ asset('css/' ~ app.request.locale ~ '/home.css') }}" />
? – Spunk