Closed Oleafeon closed 2 years ago
Hi @4kets, thanks for bringing this to my attention! This is the first time hearing about this issue, so I'll need to do some testing on my end to recreate this use case. I'm not entirely sure when I'll be able to look into this so a potential workaround for now is to not use Captcha's disclaimer and to simply add an extra variable as a translatable Global.
Allright thank you!
did you have a change to look into this already "simply add an extra variable as a translatable Global." worked so for me this is closed :D
@4kets No, not yet but it definitely sounds like a bug so please leave it open and I'll get to it... someday 😅
Allright thank you
Hi @4kets, I finally had a chance to look into this; turns out it's not a bug after all!
It seems you can't use Laravel's translate helper __()
inside config files (since config files are one of the first things the framework initialises). I guess within Statamic's context, my suggestion of using Globals is probably still the easiest workaround, though they do mention the trans
tag in their docs which I just tried out and works great too: https://statamic.dev/tags/trans
Either way, thanks for reporting anyway, I learned something new by looking into this and now know what to suggest going forward!
We want to display the disclaimer in 2 languages, but when we use __("disclaimer"); in the config file it returns a error saying target class [translator] does not exist