PHPackages                             tripteki/laravelphp-setting-locale - 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. tripteki/laravelphp-setting-locale

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

tripteki/laravelphp-setting-locale
==================================

Trip Teknologi's Laravel.php Setting Locale

1.1.2(2y ago)071[1 issues](https://github.com/tripteki/laravelphp-setting-locale/issues)MITPHPPHP ^8.0.2

Since Nov 10Pushed 2y agoCompare

[ Source](https://github.com/tripteki/laravelphp-setting-locale)[ Packagist](https://packagist.org/packages/tripteki/laravelphp-setting-locale)[ Docs](https://github.com/tripteki/laravelphp-setting-locale)[ RSS](/packages/tripteki-laravelphp-setting-locale/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (6)Versions (5)Used By (0)

Setting Locale
==============

[](#setting-locale)

This package provides implementation of setting locale in repository pattern for Lumen and Laravel besides REST API starterpack of admin management with no intervention to codebase and keep clean.

Getting Started
---------------

[](#getting-started)

Installation :

```
composer require tripteki/laravelphp-setting-locale

```

How to use it :

- Put `Tripteki\SettingLocale\Providers\SettingLocaleServiceProvider` to service provider configuration list.
- Put `Tripteki\SettingLocale\Providers\SettingLocaleServiceProvider::ignoreMigrations()` into `register` provider, then publish migrations file into your project's directory with running (optionally) :

```
php artisan vendor:publish --tag=tripteki-laravelphp-setting-locale-migrations

```

- Migrate.

```
php artisan migrate

```

- Publish tests file into your project's directory with running (optionally) :

```
php artisan vendor:publish --tag=tripteki-laravelphp-setting-locale-tests

```

- Sample :

```
use Tripteki\SettingLocale\Contracts\Repository\Admin\ISettingLocaleLanguageRepository;
use Tripteki\SettingLocale\Contracts\Repository\Admin\ISettingLocaleTranslationRepository;
use Tripteki\SettingLocale\Contracts\Repository\ISettingLocaleRepository;

$languageRepository = app(ISettingLocaleLanguageRepository::class);
$translationRepository = app(ISettingLocaleTranslationRepository::class);

// $languageRepository->create([ "code" => "en", "locale" => "en-US", ]); //
// $languageRepository->delete("en"); //
// $languageRepository->update("en", [ "locale" => "en-UK", ]); //
// $languageRepository->get("en"); //
// $languageRepository->all(); //

// $translationRepository->create("en", [ "key" => "auth.throttle", "translate" => "Too many login attempts. Please try again in :seconds seconds.", ]); //
// $translationRepository->delete("en", "auth.throttle"); //
// $translationRepository->update("en", "auth.throttle", [ "key" => "auth.throttle", "translate" => "Too many login attempts. Please try again in :minutes minutes.", ]); //
// $translationRepository->get("en", "auth.throttle"); //
// $translationRepository->all("en"); //

$repository = app(ISettingLocaleRepository::class);
// $repository->setUser(...); //
// $repository->getUser(); //

// $repository->setLocale("en"); //
// $repository->getLocale(); //
// locale(); //
// $repository->translate("auth.throttle"); //
// trans("auth.throttle"); //
// __("auth.throttle"); //
```

- Generate swagger files into your project's directory with putting this into your annotation configuration (optionally) :

```
base_path("app/Http/Controllers/SettingLocale")

```

```
base_path("app/Http/Controllers/Admin/SettingLocale")

```

Usage
-----

[](#usage)

`php artisan adminer:install:setting:locale`

Author
------

[](#author)

- Trip Teknologi ([@tripteki](https://linkedin.com/company/tripteki))
- Hasby Maulana ([@hsbmaulana](https://linkedin.com/in/hsbmaulana))

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity50

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 ~5 days

Total

4

Last Release

896d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3bcb25d4bbf5d664b8dd7cc7e5c194f876f54c994a1b3b9ebeaab370f577025a?d=identicon)[tripteki](/maintainers/tripteki)

---

Top Contributors

[![hsbmaulana](https://avatars.githubusercontent.com/u/38196994?v=4)](https://github.com/hsbmaulana "hsbmaulana (5 commits)")

---

Tags

bannet

### Embed Badge

![Health badge](/badges/tripteki-laravelphp-setting-locale/health.svg)

```
[![Health](https://phpackages.com/badges/tripteki-laravelphp-setting-locale/health.svg)](https://phpackages.com/packages/tripteki-laravelphp-setting-locale)
```

###  Alternatives

[symfony/translation

Provides tools to internationalize your application

6.6k836.5M2.0k](/packages/symfony-translation)[nesbot/carbon

An API extension for DateTime that supports 281 different languages.

169661.4M4.8k](/packages/nesbot-carbon)[joedixon/laravel-translation

A tool for managing all of your Laravel translations

717911.4k11](/packages/joedixon-laravel-translation)[illuminate/translation

The Illuminate Translation package.

6936.4M491](/packages/illuminate-translation)[larswiegers/laravel-translations-checker

Make sure your laravel translations are checked and are included in all languages.

256423.2k2](/packages/larswiegers-laravel-translations-checker)[inpsyde/multilingual-press

Simply THE multisite-based free open source plugin for your multilingual websites.

2414.0k1](/packages/inpsyde-multilingual-press)

PHPackages © 2026

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