简体   繁体   中英

Symfony2 Translatable choose language / skip translation

Is it possible to get a specific translation in twig or to skip the translation? I want to get an english translation for a specific field undependant from the current locale

Yes, you can force a locale like this:

{% trans with {'%name%': 'Fabien'} from "app" into "fr" %}Hello %name%{% endtrans %}

Found in documentation .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM