我对 css 文件有以下结构 Public - css -- fr --- style.css -- en --- style.css
css 文件夹包括 fr 和 en 文件夹
我在我的模板中包含 CSS 样式表,如下所示:
{% stylesheets '@AtgNewsBundle/Resources/public/css/*' filter='cssrewrite' %}
<link rel="stylesheet" href="{{ asset_url }}" />
{% endstylesheets %}
所以我需要包含 fr 或 en 文件夹作为用户选择
我尝试了以下但不起作用
{% stylesheets '@AtgNewsBundle/Resources/public/css/{app.request.getLocale()}/*' filter='cssrewrite' %}
{% stylesheets '@AtgNewsBundle/Resources/public/css/{{app.request.getLocale()}}/*' filter='cssrewrite' %}
{% stylesheets '@AtgNewsBundle/Resources/public/css/"{{app.request.getLocale()}}"/*' filter='cssrewrite' %}
请有任何帮助