#Access "t" function from i18n on server side without req
2 messages · Page 1 of 1 (latest)
Help is on the way! To mark it as solved, use the /solve command. In the meantime, here are some existing threads that may help you:
2 messages · Page 1 of 1 (latest)
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
Help is on the way! To mark it as solved, use the /solve command. In the meantime, here are some existing threads that may help you: