PHPackages                             queiroz/tld-lang - 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. queiroz/tld-lang

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

queiroz/tld-lang
================

TldLang multi domain site language for Laravel 4

117PHP

Since Feb 11Pushed 12y ago1 watchersCompare

[ Source](https://github.com/queiroz/TldLang)[ Packagist](https://packagist.org/packages/queiroz/tld-lang)[ RSS](/packages/queiroz-tld-lang/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependenciesVersions (1)Used By (0)

TldLang
=======

[](#tldlang)

Laravel 4 - auto select language based on domain .tld

Installation
============

[](#installation)

Add TldLang to your composer.json file:

```
"require": {
	"queiroz/tld-lang": "dev-master"
}

```

Use composer to install this package.

```
$ composer update

```

Configuration
=============

[](#configuration)

#### Registering the Package

[](#registering-the-package)

register this service provider at the bottom of the $providers array: app.php

```
'Queiroz\TldLang\TldLangServiceProvider'

```

Usage
=====

[](#usage)

#### Basic usage

[](#basic-usage)

Supose you have domain.com (English), domain2.es (Spanish), domain3.fr (French) you can simply change the system language based on this .tlds

```
TldLang::set(array(
	'.com' 	=> 	'en',
	'.es'	=> 	'es',
	'.fr'	=>	'fr'
));

```

and finally initialize

`TldLang::init();`

###  Health Score

20

—

LowBetter than 12% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/670685?v=4)[Rodrigo Queiroz](/maintainers/queiroz)[@queiroz](https://github.com/queiroz)

---

Top Contributors

[![queiroz](https://avatars.githubusercontent.com/u/670685?v=4)](https://github.com/queiroz "queiroz (15 commits)")

### Embed Badge

![Health badge](/badges/queiroz-tld-lang/health.svg)

```
[![Health](https://phpackages.com/badges/queiroz-tld-lang/health.svg)](https://phpackages.com/packages/queiroz-tld-lang)
```

###  Alternatives

[smarty-gettext/smarty-gettext

Gettext plugin enabling internationalization in Smarty Package files

752.5M8](/packages/smarty-gettext-smarty-gettext)[renatomarinho/laravel-multi-language

Laravel Multi Language

235.1k](/packages/renatomarinho-laravel-multi-language)

PHPackages © 2026

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