PHPackages                             joylab/tarjim-laravel-client - 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. joylab/tarjim-laravel-client

ActiveLibrary

joylab/tarjim-laravel-client
============================

Laravel SDK for Tarjim.io (https://tarjim.io)

1.0(1y ago)014MITPHPPHP ^7.2 | ^8.0

Since Apr 9Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Tarjim-io/tarjim-laravel-client)[ Packagist](https://packagist.org/packages/joylab/tarjim-laravel-client)[ RSS](/packages/joylab-tarjim-laravel-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (3)Used By (0)

Tarjim Laravel Client
=====================

[](#tarjim-laravel-client)

The `tarjim-laravel-client` package integrates **Tarjim.io** translations into Laravel, allowing **easy synchronization, management, and caching** of translations.

Features
--------

[](#features)

✅ Reads config from `config/tarjim.php`.
✅ Middleware for setting locale from session.
✅ Artisan commands for managing translations.

---

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

[](#installation)

### 1. Install the Package

[](#1-install-the-package)

Run the following command:

```
composer require joylab/tarjim-laravel-client
```

### 2. Publish Configuration

[](#2-publish-configuration)

```
php artisan vendor:publish --provider="Tarjim\Laravel\ServiceProvider"
```

### 3. Configure the Package

[](#3-configure-the-package)

Edit the `config/tarjim.php` file with your Tarjim project settings.

### 4. Use Middleware

[](#4-use-middleware)

Add the middleware in `app/Http/Kernel.php`:

```
\Tarjim\Laravel\Middleware\TarjimLocalizationMiddleware::class,
```

This sets the application's locale dynamically based on session data, e.g., `session(['locale' => 'en_US'])`.

---

Artisan Commands
----------------

[](#artisan-commands)

### 1. Export Translations

[](#1-export-translations)

Export translation keys from **Tarjim.io** to Laravel’s `/lang` directory.

#### `tarjim:export-php`

[](#tarjimexport-php)

**Exports translations in PHP array format.**

```
php artisan tarjim:export-php --project-id=123 --namespace="common" --lang-path="resources/lang"
```

##### Options:

[](#options)

OptionDescription`--lang-path=`Custom language path. Defaults to `lang_path()`.`--locales-mappings=`JSON mapping for languages, e.g., `{"ar":"ar_LB","en":"en_US"}`.`--project-id=`Specify the Tarjim project ID Or Branch ID.`--namespace=`Namespace(s), accepts a string or array.`--verified=`Set to `true` to export only verified keys.`--apikey=`API key for authentication.---

#### `tarjim:export-json`

[](#tarjimexport-json)

**Exports translations in JSON format for Laravel's `__()` function.**

```
php artisan tarjim:export-json --project-id=123 --namespace="frontend" --lang-path="resources/lang/json"
```

##### Options:

[](#options-1)

OptionDescription`--lang-path=`Custom language path. Defaults to `lang_path()`.`--locales-mappings=`JSON mapping for languages, e.g., `{"fr":"fr_CA","es":"es_MX"}`.`--project-id=`Specify the Tarjim project ID Or Branch ID.`--namespace=`Namespace(s), accepts a string or array.`--verified=`Set to `true` to export only verified keys.`--apikey=`API key for authentication.---

#### `tarjim:export-ios-strings`

[](#tarjimexport-ios-strings)

**Exports translations in `.strings` format for iOS.**

```
php artisan tarjim:export-ios-strings --project-id=123 --namespace="app" --file-format="%namespace%_%language%.strings"
```

##### Options:

[](#options-2)

OptionDescription`--lang-path=`Custom language path. Defaults to `lang_path()`.`--project-id=`Specify the Tarjim project ID Or Branch ID.`--namespace=`Namespace(s), accepts a string or array.`--verified=`Set to `true` to export only verified keys.`--split-files-by-namespace=`Set to `true` to split files by namespace.`--file-format=`Custom file naming format, e.g., `%namespace%%language%%project_name%`.`--key-case=`Transform key case (`key_case_preserve`, `key_case_to_upper`, etc.).`--apikey=`API key for authentication.---

#### `tarjim:export-android-xml`

[](#tarjimexport-android-xml)

**Exports translations in `.xml` format for Android.**

```
php artisan tarjim:export-android-xml --project-id=123 --namespace="mobile" --file-format="values-%language%"
```

##### Options:

[](#options-3)

OptionDescription`--lang-path=`Custom language path. Defaults to `lang_path()`.`--project-id=`Specify the Tarjim project ID Or Branch ID.`--namespace=`Namespace(s), accepts a string or array.`--verified=`Set to `true` to export only verified keys.`--split-files-by-namespace=`Set to `true` to split files by namespace.`--file-format=`Custom file naming format, e.g., `values-%language%`.`--key-case=`Transform key case (`key_case_preserve`, `key_case_to_upper`, etc.).`--apikey=`API key for authentication.---

### 2. Manage Translation Keys

[](#2-manage-translation-keys)

#### `tarjim:get-keys`

[](#tarjimget-keys)

**Retrieves translation keys and values.**

```
php artisan tarjim:get-keys --project-id=123 --namespace="backend" --language="fr"
```

##### Options:

[](#options-4)

OptionDescription`--project-id=`Tarjim project ID.`--key=`Specific key(s) to fetch. Accepts multiple values.`--namespace=`Namespace(s). Accepts multiple values.`--language=`Language code (e.g., `en`, `ar`).`--apikey=`API key for authentication.---

#### `tarjim:set-keys`

[](#tarjimset-keys)

**Adds new translation keys and values.**

```
php artisan tarjim:set-keys --project-id=123 --namespace="errors" --language="es" --key-value='{"ERROR_404":"Página no encontrada"}'
```

##### Options:

[](#options-5)

OptionDescription`--project-id=`Tarjim project ID.`--key-value=`JSON string of keys and values, e.g., `{"hello":"Hello"}`.`--namespace=`Namespace(s). Accepts multiple values.`--language=`Language code.`--apikey=`API key for authentication.---

### 3. Refresh Cache

[](#3-refresh-cache)

#### `tarjim:refresh-cache`

[](#tarjimrefresh-cache)

**Syncs local translations with Tarjim.io.**

```
php artisan tarjim:refresh-cache
```

---

Conclusion
----------

[](#conclusion)

The **Tarjim Laravel Client** simplifies **translation management** in Laravel. Install the package, configure it, and use Artisan commands to keep translations up to date. 🚀

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance43

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 60% 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

Unknown

Total

1

Last Release

504d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e77a4591027beabc3495b98404cd5e6af9aaa5174c0ad1b00f5931cccd2d3dc5?d=identicon)[gr0g](/maintainers/gr0g)

![](https://www.gravatar.com/avatar/7df935f04cef16c569c4693a49bfe39697df4542ba451924eb353df296394fc1?d=identicon)[hussein.hammoud](/maintainers/hussein.hammoud)

![](https://www.gravatar.com/avatar/1044223a3711524d4eb725ad2fadfa96e455b21fa4a68da516fa0f05b56c81a6?d=identicon)[John-PaulRA](/maintainers/John-PaulRA)

---

Top Contributors

[![John-PaulRA](https://avatars.githubusercontent.com/u/45034333?v=4)](https://github.com/John-PaulRA "John-PaulRA (6 commits)")[![husein-m-hammoud](https://avatars.githubusercontent.com/u/62076515?v=4)](https://github.com/husein-m-hammoud "husein-m-hammoud (4 commits)")

---

Tags

laraveltranslationstarjim

### Embed Badge

![Health badge](/badges/joylab-tarjim-laravel-client/health.svg)

```
[![Health](https://phpackages.com/badges/joylab-tarjim-laravel-client/health.svg)](https://phpackages.com/packages/joylab-tarjim-laravel-client)
```

###  Alternatives

[spatie/laravel-health

Monitor the health of a Laravel application

85810.0M83](/packages/spatie-laravel-health)[s-ichikawa/laravel-sendgrid-driver

This library adds a 'sendgrid' mail driver to Laravel.

4139.3M1](/packages/s-ichikawa-laravel-sendgrid-driver)[laravel-notification-channels/discord

Laravel notification driver for Discord.

2371.3M11](/packages/laravel-notification-channels-discord)[tzsk/sms

A robust and unified SMS gateway integration package for Laravel, supporting multiple providers.

320244.3k6](/packages/tzsk-sms)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

226102.4k](/packages/erag-laravel-disposable-email)[truckersmp/steam-socialite

Laravel Socialite provider for Steam OpenID.

1516.7k](/packages/truckersmp-steam-socialite)

PHPackages © 2026

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