Releases: leafsphp/lingo
Releases · leafsphp/lingo
Release list
🐦⬛ Mockingbird
v5.0 - 13 Aug 2026
Added
- First stable release of Lingo: translations for Leaf apps from simple YAML files, including nested files and folders per locale
- Three locale detection strategies out of the box:
router(locale in the URL),session(remembered per visitor) andheader(negotiated fromAccept-Language), plus support for writing your own custom strategy - Translation parameters:
welcome: "Hello, {name}"resolves withlingo('welcome', ['name' => $user->name]) - Configure from your
.envwithAPP_LOCALEandLOCALES_STRATEGY, read live so long-running workers stay honest - Locale override support,
getLocaleData()andgetLocaleName()for building language switchers - Blade users get
@lingoand@tldirectives through Leaf Blade - Plays well with Leaf Sitemap: localized routes are handled without polluting your sitemap
- Full test suite, run through Alchemy
Worth knowing if you used Lingo pre-release
- The session strategy remembers the chosen locale across requests
- The header strategy properly parses
Accept-Languageinstead of comparing the raw header to filenames - The router strategy validates the first URL segment against your configured locales, so
/aboutis never mistaken for a locale
Changed
- Lingo requires PHP 8.2+ and Leaf 5