0

For the language selection I want to show the flag of the current active languages.

I get the language variable by:

app.request.locale

Now I want to use the value in the string of the flag url.

<img src="{{ asset('flags/'+app.request.locale+'.png', 'img') }}" />

But what is the correct syntax for this?

1 Answer 1

3

You have to use ~ char instead of +.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.