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 today

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 26% 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

[symfony/polyfill

Symfony polyfills backporting features to lower PHP versions

2.8k4.7M28](/packages/symfony-polyfill)[spatie/laravel-navigation

Manage menus, breadcrumbs, and other navigational elements in Laravel apps

5831.2M16](/packages/spatie-laravel-navigation)[spatie/laravel-missing-page-redirector

Redirect missing pages in your Laravel application

5131.5M19](/packages/spatie-laravel-missing-page-redirector)[johnbillion/wp-crontrol

Take control of the cron events on your WordPress website or WooCommerce store

22790.2k1](/packages/johnbillion-wp-crontrol)[mage-os/magento-cache-clean

A faster drop in replacement for bin/magento cache:clean with file watcher

49299.6k2](/packages/mage-os-magento-cache-clean)[elgentos/shopware-seo-canonical-url

Use parent product canonical URL for SEO

183.4k](/packages/elgentos-shopware-seo-canonical-url)

PHPackages © 2026

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