#Access "t" function from i18n on server side without req

2 messages · Page 1 of 1 (latest)

chrome delta
#

Hi! Is there a way to access t function to translate with payload without needing the full express request? I was hoping to access it via the payload object but had no success with it.

console.log(req?.t('error:testerrorkey'));

Works, but I want to do
console.log(payload.t('error:testerrorkey')); Or something similar

swift prairieBOT