現在のロケール設定に応じて、データを直接処理できます。
しかし、ときどきロケール設定を無視して各データにアクセスしたいことがあります。
コントローラで。
このように各データにアクセスできます。
$transRepo = $em->getRepository('Gedmo\Translatable\Entity\Translation');
$repo = $transRepo->findTranslations($myEntity);
var_dump($repo['en']['comment']);
では、小枝で各言語のデータを取得する方法はありますか??
{{comment}} // it shows the comment depending on the locale setting.
{{comment | trancelate(en)}} // I want to ignore the locale setting like this.