Category: Laravel, Laravel

Laravel translations can depend on the number of subjects: one apple, two apples. This article will explain more complex pluralizations: no apples, one apple, two apples, tons of apples.

An example of these translations: 'title' => 'Comments', 'title' => 'Reacties', In your views you can use these with a helper like so: trans('comments.title') Parameters can be used in translations like so: 'number-of-comments' => ':count comments', trans('comments.number-of-comments', ['count' => $count])

Because Laravel translations are powered by the Symfony Translation component we can define even more powerful translations like this.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners