Level 6
Yes, you can do this way:
if (\Lang::has('general.token')) {
// line exists.
} else {
// line not exist.
}
1 like
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Iam using resources/lang to translations...
echo trans('messages.page_title');
return [ 'page_title' => 'QuickAdmin page' ];
Everything is fine... I just want to know if is any way to check if some string in Application using trans() function hasn't a translation
Thanks
Please or to participate in this conversation.