PHPackages                             yaroslawww/laravel-i18n-strings-batch - 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. yaroslawww/laravel-i18n-strings-batch

ActiveLibrary

yaroslawww/laravel-i18n-strings-batch
=====================================

Simple way to transfer strings to js component without load all lang files or additional ajax requests.

1.1.0(2y ago)059MITPHPPHP ^8.0

Since Nov 23Pushed 2y ago1 watchersCompare

[ Source](https://github.com/yaroslawww/laravel-i18n-strings-batch)[ Packagist](https://packagist.org/packages/yaroslawww/laravel-i18n-strings-batch)[ Docs](https://github.com/yaroslawww/laravel-i18n-strings-batch)[ RSS](/packages/yaroslawww-laravel-i18n-strings-batch/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (5)Used By (0)

i18n strings batch
==================

[](#i18n-strings-batch)

[![Packagist License](https://camo.githubusercontent.com/ba88c8bb5d3feee1edf603b32a5bac97b1eddae2f804e2dd8719ab0889639301/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7961726f736c617777772f6c61726176656c2d6931386e2d737472696e67732d62617463683f636f6c6f723d253233346463373166)](https://github.com/yaroslawww/laravel-i18n-strings-batch/blob/master/LICENSE.md)[![Packagist Version](https://camo.githubusercontent.com/002082f5f21757f68aa58003f3bb17258754167fe52389f59484bbde07514b1d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7961726f736c617777772f6c61726176656c2d6931386e2d737472696e67732d6261746368)](https://packagist.org/packages/yaroslawww/laravel-i18n-strings-batch)[![Total Downloads](https://camo.githubusercontent.com/86fc98e875dbf83a2b33c4e0ffe2c73b215389483b7ae38d5d559d4208a8a73f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7961726f736c617777772f6c61726176656c2d6931386e2d737472696e67732d6261746368)](https://packagist.org/packages/yaroslawww/laravel-i18n-strings-batch)[![Build Status](https://camo.githubusercontent.com/f8231bdccdb6a3b7832066161c86f77e5f4bc336384f7c07d7b6b6dce71f795c/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7961726f736c617777772f6c61726176656c2d6931386e2d737472696e67732d62617463682f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/yaroslawww/laravel-i18n-strings-batch/build-status/master)[![Code Coverage](https://camo.githubusercontent.com/bbf7376e0db5e3a2979a153472dcd724afe3e985c039c007fe7dac4c9c948e50/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7961726f736c617777772f6c61726176656c2d6931386e2d737472696e67732d62617463682f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/yaroslawww/laravel-i18n-strings-batch/?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/b187b270e404c577f133b47aabc580e4796bce7d7b406ef2ed0a61dcc70a5de3/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7961726f736c617777772f6c61726176656c2d6931386e2d737472696e67732d62617463682f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/yaroslawww/laravel-i18n-strings-batch/?branch=master)

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

[](#installation)

Install the package via composer:

```
composer require yaroslawww/laravel-i18n-strings-batch
```

Usage
-----

[](#usage)

#### Set specific directory for language strings.

[](#set-specific-directory-for-language-strings)

As usually js strings has other formatting for `choise` and others - you will want set all js strings to specific directory and call batches without specify directory each time:

```
use I18nStringsBatch\I18nStringsBatchManager;

class AppServiceProvider extends ServiceProvider
{
    public function register()
    {
        I18nStringsBatchManager::setDefaultDirectoryPrefix('front-js');
    }
}

```

#### Usage in php

[](#usage-in-php)

```
\I18nStringsBatch\Facades\I18nStringsBatch::getBatch(["licenses-list", "modal-confirmation"]);
\I18nStringsBatch\Facades\I18nStringsBatch::getBatchJson(["licenses-list", "modal-confirmation"]);
// or
\I18nStringsBatch\Facades\I18nStringsBatch::getBatch("modal-confirmation");
\I18nStringsBatch\Facades\I18nStringsBatch::getBatchJson("modal-confirmation");

// Using helpers
i18n_strings_batch(["licenses-list", "modal-confirmation"])
i18n_strings_batch_json(["licenses-list", "modal-confirmation"])
// or
i18n_strings_batch("modal-confirmation")
i18n_strings_batch_json("modal-confirmation")

```

#### Usage with component

[](#usage-with-component)

```

```

### Usage with vue

[](#usage-with-vue)

Optionally publish assets

```
php artisan vendor:publish --tag=i18n-string-batch-resources --force
```

Example you can find [there](./docs/vue.md)

### Add directive to PHPStorm

[](#add-directive-to-phpstorm)

[![](./docs/assets/phpstorm.png)](./docs/assets/phpstorm.png)

```
transBatch

```

Credits
-------

[](#credits)

- [![Think Studio](https://camo.githubusercontent.com/8e541bece07d503c85a126b5294865faa00e27371048772f566a0cce8c01fd3a/68747470733a2f2f7961726f736c617777772e6769746875622e696f2f696d616765732f73706f6e736f72732f7061636b616765732f6c6f676f2d7468696e6b2d73747564696f2e706e67)](https://think.studio/)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~243 days

Total

4

Last Release

901d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/23663794?v=4)[yaroslawww](/maintainers/yaroslawww)[@yaroslawww](https://github.com/yaroslawww)

---

Top Contributors

[![yaroslawww](https://avatars.githubusercontent.com/u/23663794?v=4)](https://github.com/yaroslawww "yaroslawww (10 commits)")

---

Tags

laraveljs-i18n

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/yaroslawww-laravel-i18n-strings-batch/health.svg)

```
[![Health](https://phpackages.com/badges/yaroslawww-laravel-i18n-strings-batch/health.svg)](https://phpackages.com/packages/yaroslawww-laravel-i18n-strings-batch)
```

###  Alternatives

[rtconner/laravel-likeable

Trait for Laravel Eloquent models to allow easy implementation of a 'like' or 'favorite' or 'remember' feature.

394388.0k5](/packages/rtconner-laravel-likeable)[hemp/presenter

Easy Model Presenters in Laravel

247592.6k1](/packages/hemp-presenter)[slowlyo/owl-admin

基于 laravel、amis 开发的后台框架~

61214.2k26](/packages/slowlyo-owl-admin)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
