Extract Untranslated Strings from Laravel Projects using Localizator

-

Localizator is a small tool for Laravel that gives you the ability to extract untranslated strings from project files. It works using the artisan command line and the provided localize command.

Installation

You can install the package via composer:

composer require --dev amirami/localizator

You can publish the config file with:

php artisan vendor:publish --provider="Amirami\Localizator\ServiceProvider" --tag="config"

Usage

To extract all the strings, it’s as simple as running:

php artisan localize de,fr

This commands will create (if don’t exist) de.json and fr.json files inside the resources/lang directory.

You can also run the artisan command without the country code arguments.

php artisan localize

In this case translation strings will be generated for the language specified in app.locale config.


You can learn more about this package, get full installation instructions, and view the source code on GitHub.

Dark Mode

localizator (this link opens in a new window) by amiranagram (this link opens in a new window)

Scan you project and generate language files ready to translate in language(s) of choosing.

Share this article

Recent posts

How to debug Artisan with Xdebug?

Xdebug 2 If you are using Xdebug 2 type this command in the terminal: php...

Extract Untranslated Strings from Laravel Projects using Localizator

Localizator is a small tool for Laravel that gives you the ability to extract untranslated strings from project files. It works using...

Use Laravel’s default translation strings in JavaScript

There are many great Laravel packages that offer ways to use Larave's translation strings in front-end, like mariuzzo/laravel-js-localization and thepinecode/i18n, but what...

How to Run Laravel Using Multiple Database Connections on the Fly

Recently I've found myself in a scenario where I had to run multiple database connections in a single Laravel application. Pretty easy...

Popular categories

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Recent comments