Differences from Laravel
Last updated:
Everything here only adds behaviour for cases Laravel's translator never sees. For anything Laravel handles, the output is the same, and the tests check that against the real translator.
- Regional locales find their language.
dv-MVusesdvlines anden-XXuses English plural rules, because<html lang>values are often more specific than the language folders. stringsis searched for bare keys.lang:jsturnslang/en.jsoninto astringsgroup, so__("Hello")looks there too.pluralRulesis an addition, for languages Laravel's table doesn't cover. See Pluralization.- Replacement values follow JS types. A
Dateor anything else without avalueproperty is converted withString(). An object with avalueproperty is treated like a PHP backed enum.
stringable() and determineLocalesUsing() from Laravel's Translator aren't included.