PHPackages                             molajo/route - 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. [API Development](/categories/api)
4. /
5. molajo/route

ActiveMolajo-package[API Development](/categories/api)

molajo/route
============

Molajo Route Services for PHP Applications

0.1.0(12y ago)0429MITPHPPHP &gt;=5.3.10

Since Nov 25Pushed 10y ago4 watchersCompare

[ Source](https://github.com/Molajo/Route)[ Packagist](https://packagist.org/packages/molajo/route)[ Docs](http://github.com/Molajo/Route)[ RSS](/packages/molajo-route/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

======= Route Package
=====================

[](#route-package)

[![Build Status](https://camo.githubusercontent.com/035f4a9d1733ebe6ef3101e6c6c17573ea82fa155da92f41e815bf628060e90b/68747470733a2f2f7472617669732d63692e6f72672f4d6f6c616a6f2f526f7574652e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/Molajo/Route)

Route Services supporting translations for the User Interface for PHP applications using Adapters for different implementation types (ex., Database, \*.ini files, etc.).

System Requirements
-------------------

[](#system-requirements)

- PHP 5.3.3, or above
- [PSR-0 compliant Autoloader](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md)
- PHP Framework independent
- \[optional\] PHPUnit 3.5+ to execute the test suite (phpunit --version)

### How to specify Route

[](#how-to-specify-route)

Route strings are loaded in startup for language determined in this order (and installed):

1. Injected value during class instantiation
2. Session
3. User Data
4. Client Route
5. Application Configuration
6. Defaults to en-GB

Instantiation
-------------

[](#instantiation)

To instantiate the Route Class:

```
   $language = new Route($language);
```

Once instantiated, all calls to the class can be made using the $language instance.

Route Properties
----------------

[](#route-properties)

To retrieve the key value (ex. 'en-GB') for the language which is loaded:

```
   $language->get('language');
```

### Retrieve Route Strings

[](#retrieve-route-strings)

To retrieve all language strings and translations for the loaded language:

```
   $language->get('strings');
```

### Retrieve List of all installed Routes

[](#retrieve-list-of-all-installed-routes)

To retrieve a list of all languages installed in this application:

```
   $language->get('installed');
```

### Retrieve Route Attribute

[](#retrieve-route-attribute)

To retrieve a registry attribute value (id, name, rtl, local, first\_day) for the loaded language:

```
   $language->get('name-of-attribute');
```

### Retrieve all Route Attributes

[](#retrieve-all-route-attributes)

To retrieve all registry attribute values as an array for the loaded language:

```
   $language->get('registry');
```

Translate
---------

[](#translate)

To translate the string $xyz:

```
   $language->translate($xyz);
```

To retrieve a list of language strings and translations matching a wildcard value:

```
   $language->translate($xyz, 1);
```

Identify Untranslated Strings
-----------------------------

[](#identify-untranslated-strings)

To insert strings found in code but are not already in database:

- If an administrator is logged on, the primary language services automatically insert untranslated strings
- To avoid doing so, override the `RoutePlugin` and set `insert_missing_strings` to `0`
- For instances you define, set the `insert_missing_strings`, as needed.

To log strings found in code, but are not already in database:

- Set the Application configuration option `profile_missing_strings` to `1` and turn on `profiling`

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity48

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

Unknown

Total

1

Last Release

4554d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/95525?v=4)[AmyStephen](/maintainers/AmyStephen)[@AmyStephen](https://github.com/AmyStephen)

---

Top Contributors

[![AmyStephen](https://avatars.githubusercontent.com/u/95525?v=4)](https://github.com/AmyStephen "AmyStephen (41 commits)")

---

Tags

routeMolajoCommonApi

### Embed Badge

![Health badge](/badges/molajo-route/health.svg)

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

###  Alternatives

[nezamy/route

Route - Fast, flexible routing for PHP, enabling you to quickly and easily build RESTful web applications.

21436.6k5](/packages/nezamy-route)

PHPackages © 2026

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