PHPackages                             vildanbina/laravel-translation-pruner - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Localization &amp; i18n](/categories/localization)
4. /
5. vildanbina/laravel-translation-pruner

ActiveLibrary[Localization &amp; i18n](/categories/localization)

vildanbina/laravel-translation-pruner
=====================================

Simple Laravel package to find and remove unused translations

v1.0.0(4mo ago)2013↓100%[1 issues](https://github.com/vildanbina/laravel-translation-pruner/issues)MITPHPPHP ^8.4CI passing

Since Nov 18Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/vildanbina/laravel-translation-pruner)[ Packagist](https://packagist.org/packages/vildanbina/laravel-translation-pruner)[ Docs](https://github.com/vildanbina/laravel-translation-pruner)[ GitHub Sponsors](https://github.com/vildanbina)[ RSS](/packages/vildanbina-laravel-translation-pruner/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (15)Versions (2)Used By (0)

Laravel Translation Pruner
==========================

[](#laravel-translation-pruner)

[![Latest Stable Version](https://camo.githubusercontent.com/aa0349ee821236d41eda2fb21d5516c655f7af1800e17b87c1092f9939b5e3f8/68747470733a2f2f706f7365722e707567782e6f72672f76696c64616e62696e612f6c61726176656c2d7472616e736c6174696f6e2d7072756e65722f76)](https://packagist.org/packages/vildanbina/laravel-translation-pruner)[![Total Downloads](https://camo.githubusercontent.com/87d8dfadd4e25c80832ad80f8796c2c911c3dc16266ebbcf66f9542d8cd1e299/68747470733a2f2f706f7365722e707567782e6f72672f76696c64616e62696e612f6c61726176656c2d7472616e736c6174696f6e2d7072756e65722f646f776e6c6f616473)](https://packagist.org/packages/vildanbina/laravel-translation-pruner)[![License](https://camo.githubusercontent.com/25d3bd7cdbf3b2931e67737f5951e98f741c380ca49c004a41cf6e01111b3f68/68747470733a2f2f706f7365722e707567782e6f72672f76696c64616e62696e612f6c61726176656c2d7472616e736c6174696f6e2d7072756e65722f6c6963656e7365)](https://packagist.org/packages/vildanbina/laravel-translation-pruner)[![PHP Version Require](https://camo.githubusercontent.com/97432d24fa1284f9cfb3bb6b373ae8433600cd01fa89ea7f79008ba4c8bb20a2/68747470733a2f2f706f7365722e707567782e6f72672f76696c64616e62696e612f6c61726176656c2d7472616e736c6174696f6e2d7072756e65722f726571756972652f706870)](https://packagist.org/packages/vildanbina/laravel-translation-pruner)[![GitHub Workflow Status (main)](https://camo.githubusercontent.com/ee833e22f6c2052d458eb89b43acfa0f097f1e84b5e90f26f370d4d17920a85e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f76696c64616e62696e612f6c61726176656c2d7472616e736c6174696f6e2d7072756e65722f63692e796d6c3f6c6162656c3d5465737473)](https://camo.githubusercontent.com/ee833e22f6c2052d458eb89b43acfa0f097f1e84b5e90f26f370d4d17920a85e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f76696c64616e62696e612f6c61726176656c2d7472616e736c6174696f6e2d7072756e65722f63692e796d6c3f6c6162656c3d5465737473)

A simple Laravel package to find and remove unused translations from your codebase.

Installation
------------

[](#installation)

```
composer require vildanbina/laravel-translation-pruner
```

Publish the config:

```
php artisan vendor:publish --tag="translation-pruner-config"
```

Usage
-----

[](#usage)

```
# Delete unused translations (will ask for confirmation)
php artisan translation:prune

# Delete without asking for confirmation
php artisan translation:prune --force

# Preview what would be deleted without actually deleting
php artisan translation:prune --dry-run

# Limit scanning to specific folders
php artisan translation:prune --path=app --path=modules/Blog
```

Configuration
-------------

[](#configuration)

Edit `config/translation-pruner.php`:

```
