Open lu43n opened 3 years ago
@lu43n it can be changed in the configuration https://github.com/mhujer/BreadcrumbsBundle#configuration or passed directly to the twig function when using wo_render_breadcrumbs
in the template.
Hi @mhujer ! It works only if you have one unique domain on each template and you generate item into twig template.
For example, we try to generate them into PHP controllers, depends of our routes, and we can't define it properly. Have you any idea ? (We try to put domain into translationParameters, without success)
@RomainOdeval Oh, I can see it from the linked commits - you need to pass a different translation domain to each addItem
call. It is currently not possible but I'll be happy to accept a PR which adds support for it.
You would need to add an extra $translationDomain
parameter to methods in \WhiteOctober\BreadcrumbsBundle\Model\Breadcrumbs
and also update the templates in Resources/views/
so they correctly use either global translation domain or the one from the specific breadcrumb.
I just added tests to cover existing behavior, so it should be easy to add similar tests for new use cases: https://github.com/mhujer/BreadcrumbsBundle/commit/784f9c421c07465b86fac4184b6e71bea964ead8#diff-6426747894f7bcaebf8f548599adb583ccd80bcf900cc0ae7d2f99373708c4dbR58-R79
How use domain translation in breadcrumb item label?