PHPackages                             jamwaffles/tee - 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. jamwaffles/tee

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

jamwaffles/tee
==============

PHP 5.3+ translation framework, similar to Gettext

v0.0.3(12y ago)221PHPPHP &gt;=5.3.0

Since Dec 2Pushed 12y ago1 watchersCompare

[ Source](https://github.com/jamwaffles/Tee)[ Packagist](https://packagist.org/packages/jamwaffles/tee)[ Docs](http://github.com/jamwaffles/Tee)[ RSS](/packages/jamwaffles-tee/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

Tee
===

[](#tee)

Composer-compatible translation framework for PHP 5.3+ supporting multiple translation backends.

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

[](#installation)

Tee can be installed through Composer by adding it to your dependencies like this:

```
{
	"require": {
		"jamwaffles/tee": "dev-master"
	}
}

```

Configuration
-------------

[](#configuration)

Make sure to include the Composer autoloader. You can then globally configure Tee as follows:

```
require_once 'vendor/autoload.php';

use \Tee\Translator as Trans;

Trans::configure(array(
	'adapter' => '\\Tee\\Adapter\\JSON',
	'adapterConfig' => array('translations' => 'example_translations/'),
	'locale' => 'de'
));

```

Tee is aliased to `Trans` here to make things easier.

Tee is bundled with the `\Tee\Adapter\JSON` JSON-based adapter by default. You can write your own by extending the `\Tee\TeeAdapter` interface.

Usage
-----

[](#usage)

Tee can be used as a namespaced static class as `\Tee\Translator` like this:

```
\Tee\Translator::configure(array( ... ));

$username = 'JamWaffles';
$someString = \Tee\Translator::translate("Hello, %s", $username);

```

Or with the convinence method, `T()`, like this in your templates:

```

Lorem ipsum dolor sit amet, consectetur adipisicing elit...

```

Adapters
--------

[](#adapters)

### JSON

[](#json)

The JSON adapter uses standard JSON files to store translations in a `"original": "translation"` format. For example:

```
{
	"Hello world, my name is %s": "Hallo Welt, mein Name ist %s"
}

```

Configure Tee to use the `\Tee\Adapter\JSON` adapter like this:

```
Trans::configure(array(
	'adapter' => '\\Tee\\Adapter\\JSON',
	'adapterConfig' => array('translations' => 'resources/languages/'),
	'locale' => 'de'		// Or whatever else
));

```

Pass an array to `adapterConfig` to specify where the translations will be stored. The `locale` value is the name of the translation file without the `.json` extension. The configuration above would look for a file at

```
resources/languages/de.json

```

Todo
----

[](#todo)

- Documentation on the wiki
- Modify JSON adapter file format to have a small config section so fallback languages can be specified
- Add support for multiple caching mechanisms. Will look into supporting most common existing caching libraries. APC(u) will come first.
- Better error reporting. Allow passing of logger instances?

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

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

Total

2

Last Release

4477d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

i18ntranslationtee

### Embed Badge

![Health badge](/badges/jamwaffles-tee/health.svg)

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

###  Alternatives

[jenssegers/date

A date library to help you work with dates in different languages

1.8k11.2M80](/packages/jenssegers-date)[gettext/gettext

PHP gettext manager

70530.2M102](/packages/gettext-gettext)[fightbulc/moment

Parse, validate, manipulate, and display dates in PHP w/ i18n support. Inspired by moment.js

9693.2M10](/packages/fightbulc-moment)[jms/translation-bundle

Puts the Symfony Translation Component on steroids

42510.8M63](/packages/jms-translation-bundle)[lexik/translation-bundle

This bundle allows to import translation files content into the database and provide a GUI to edit translations.

4362.7M19](/packages/lexik-translation-bundle)[sonata-project/translation-bundle

SonataTranslationBundle

771.7M10](/packages/sonata-project-translation-bundle)

PHPackages © 2026

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