Laravel 8 trans_choice() {#collection-method}

2021-07-19 10:30 更新

trans_choice 函数将根据词形变化来翻译给定的翻译键:

echo trans_choice('messages.notifications', $unreadCount); 

如果指定的翻译键不存在,trans_choice 函数将会返回您指定的键。因此,在上方的例子中,若翻译键不存在,则 trans_choice 函数将会返回 messages.notifications

以上内容是否对您有帮助:
在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号