jord-jd/translator
A Laravel package for working with application translations, offering tooling to organise, edit, and maintain language files so multilingual content stays consistent and easier to manage across your project.
has() and all() are the enablers for the work that usually comes after a translation helper — missing-key audits in CI, coverage dashboards ("what % of keys are translated per locale?"), and admin/ops tooling to inspect loaded strings. This lets you sequence "localization maturity" as a roadmap item without a rewrite; the inspection primitives now exist.0, false no longer falling back to the key) is a correctness fix, not a feature. Product-side this matters: intentionally blank labels, numeric strings, and boolean-ish feature copy were silently rendering raw keys in production. Treat this as a bug-fix justification for a patch/minor upgrade, not as scope.translate() removes sprintf/concatenation at call sites. That reduces a common class of localization defects — broken word order in non-English locales and mismatched argument counts — and makes strings handed to translators self-contained and reorderable.has()/all()-based tooling, request: test coverage report, issue-tracker activity, semver history, transitive dependency list, and confirmation that the falsy-value change is non-breaking for existing lang files.Consider it when:
Look elsewhere when:
spatie/laravel-translation-loader, Laravel Langman, or a CMS-backed approach).To executives (one paragraph): This is a small, low-cost upgrade to our translation layer with no migration work and no change to our existing language files. It fixes a correctness bug where intentionally blank or numeric copy was silently rendering raw keys to users, adds placeholder support so translated sentences stay grammatically correct in other languages, and exposes the inspection hooks we'd need for a future translation-coverage dashboard. It runs across our current and future PHP versions, so it doesn't couple to our platform upgrade timeline. Risk is low and contained; the one thing to verify is that no code relied on the old fallback behavior.
To engineering (the ask): Minor-version upgrade, expected to be drop-in. Two things to check before merge: (1) confirm nothing depends on falsy values falling back to the key — the release changes empty string, 0, and false to be treated as valid translations; (2) confirm existing lang-file structure is untouched, since the release explicitly preserves the current convention. Then adopt the new surface deliberately: placeholders in translate() to replace sprintf at call sites, array loading for bulk/frontend payloads, and has()/all() as the basis for a CI missing-key check. Return with test coverage numbers and dependency/semver history so we can size the bet on building internal tooling on top of has()/all().
How can I help you explore Laravel packages today?