CodeMusings Logo CodeMusings

Laravel translation package

2023-04-07 · 3 years ago

Turns out that we have a lot of Laravel projects which in turn uses translations. To maintain these we use a standard JSON file for each language. Suffice to say that this will create a lot of missing / obsolete / out of date translations over time.

We have created a simple check-tool that parses all source PHP and JS files, tests and blade templates to find translated strings and compares them against the current translation files. This results in a quick overview of your translation status.

We use the tool by copy/pasting the artisan command from one project to another, and updating it in between so it's a mess of checktool versions.

So we will be moving this to an (internal) package that we can include in our projects (even as a dev-dependency) so the tool is available for all projects with the latest version.

Nobody amused yet.