PHPackages                             avalon/language - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. avalon/language

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

avalon/language
===============

Avalon Language component.

09291PHP

Since Apr 7Pushed 8y ago2 watchersCompare

[ Source](https://github.com/avalonphp/language)[ Packagist](https://packagist.org/packages/avalon/language)[ RSS](/packages/avalon-language/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Avalon - Language Package
=========================

[](#avalon---language-package)

This package makes translating easy.

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

[](#installation)

This package can be installed via composer:

```
composer require avalon/language

```

Usage
-----

[](#usage)

```
use Avalon\Language;

// Create a new translation
$myLanguage = new Language(function ($t) {
    $t->name    = 'My Language';
    $t->locale  = 'en_AU';

    // The index is what we use to fetch the string value
    $t->strings = [
        'my_string_index' => 'My String Value',
        'test_x' => 'Test {1}',
        'hello_x' => 'Hello {username}',
        'x_tickets' => "{plural:{0}, {{0} ticket|{0} tickets}}",
    ];
});

// Set our language as the current language to use by passing the `locale` value
Language::setCurrent('en_AU');

// Translate some stuff
Language::translate('my_string_index'); // => 'My String Value'
Language::translate('test_x', ['Hello']); // => 'Test Hello'
Language::translate('hello_x', ['username' => 'Admin']); // => 'Hello Admin'
Language::translate('x_tickets', [1]); // => '1 ticket'
Language::translate('x_tickets', [2]); // => 2 tickets'
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

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://www.gravatar.com/avatar/9d5e4c3b5325b2392a07c30d0312451c915428a3aa6fbfa8a676b978320c03ea?d=identicon)[Nirix](/maintainers/Nirix)

---

Top Contributors

[![nirix](https://avatars.githubusercontent.com/u/61958?v=4)](https://github.com/nirix "nirix (27 commits)")

### Embed Badge

![Health badge](/badges/avalon-language/health.svg)

```
[![Health](https://phpackages.com/badges/avalon-language/health.svg)](https://phpackages.com/packages/avalon-language)
```

###  Alternatives

[usamamuneerchaudhary/country-city-state

Country City State Data Provider for Laravel 12+

242.6k](/packages/usamamuneerchaudhary-country-city-state)[coldtrick/user_support

Offers different community master features to support your users

142.4k](/packages/coldtrick-user-support)

PHPackages © 2026

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