PHPackages                             ciricihq/localized - 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. ciricihq/localized

ActiveCakephp-plugin[Localization &amp; i18n](/categories/localization)

ciricihq/localized
==================

CakePHP Localized Plugin

2.7.0(10y ago)0147MITPHPPHP &gt;=5.3

Since Dec 6Pushed 10y ago1 watchersCompare

[ Source](https://github.com/ciricihq/localized)[ Packagist](https://packagist.org/packages/ciricihq/localized)[ Docs](https://github.com/cakephp/localized)[ RSS](/packages/ciricihq-localized/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (1)Versions (15)Used By (0)

CakePHP Localized plugin
========================

[](#cakephp-localized-plugin)

[![Build Status](https://camo.githubusercontent.com/afa34ca995a3eee4c87e6f1bbc7823eb8387433d398026fb719a44801a4af99a/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f63616b657068702f6c6f63616c697a65642e7376673f6272616e63683d6d6173746572)](http://travis-ci.org/cakephp/localized)[![License](https://camo.githubusercontent.com/80fe4d9a556cc35d20a568020acf7454f1a16e2f8777cf647b5fe26484222633/68747470733a2f2f706f7365722e707567782e6f72672f63616b657068702f6c6f63616c697a65642f6c6963656e73652e737667)](https://packagist.org/packages/cakephp/localized)[![Total Downloads](https://camo.githubusercontent.com/603a1561cf04a11d058e6dc17ebf4bb80aa9f78bbf59eafa0e5ad8ec2ddeee88/68747470733a2f2f706f7365722e707567782e6f72672f63616b657068702f6c6f63616c697a65642f642f746f74616c2e737667)](https://packagist.org/packages/cakephp/localized)

This plugin contains various localized validation classes for specific countries.

Requirements
------------

[](#requirements)

The master branch has the following requirements:

- CakePHP 3.1.0 or greater.
- PHP 5.4.16 or greater.

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

[](#installation)

You can install this plugin into your CakePHP application using [composer](http://getcomposer.org).

The recommended way to install composer packages is:

```
composer require cakephp/localized

```

Load your plugin using

```
bin/cake plugin load Cake/Localized

```

or by manually putting `CakePlugin::load('Cake/Localized')` in your `boostrap.php`.

Model validation
----------------

[](#model-validation)

Localized validation classes can be used for validating model fields.

```
namespace App\Model\Table;

use Cake\ORM\Table;
use Cake\Localized\Validation\FrValidation
use Cake\Validation\Validator;

class PostsTable extends Table
{
    public function validationDefault(Validator $validator)
    {
        $validator->provider('fr', FrValidation::class);
        $validator->add('phoneField', 'myCustomRuleNameForPhone', [
            'rule' => 'phone',
            'provider' => 'fr'
        ]);
    }
}
```

For further information on validation rules see the [CakePHP documentation on validation](http://book.cakephp.org/3.0/en/core-libraries/validation.html)

PO files
--------

[](#po-files)

This plugin also houses translations for the client-facing translated strings in the core (the `cake` domain). to use these files link or copy them into their expected location: `src/Locale//cake.po`

Contributing to Localized
-------------------------

[](#contributing-to-localized)

If you find that your country is not part of the Localized plugin, please fork the project on Github. Once you have forked the project you can commit your validator class (and any test cases). As soon as you have pushed your changes back to Github you can send a pull request and your changes will be reviewed and merged in, or feedback will be given.

### Validation methods

[](#validation-methods)

There are a few methods that are common to all classes, defined through the interface "ValidationInterface":

- `phone()` to check a phone number
- `postal()` to check a postal code
- `personId()` to check a country specific person ID

Please try to fit your validation rules in that naming scheme. Apart from that you can also define further validation methods in your implementing class, of course.

Issues with Localized
---------------------

[](#issues-with-localized)

If you have issues with Localized, you can report them at [github.com/cakephp/localized/issues](https://github.com/cakephp/localized/issues).

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor5

5 contributors hold 50%+ of commits

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

Recently: every ~55 days

Total

9

Last Release

3912d ago

PHP version history (2 changes)2.1.0PHP &gt;=5.2.8

2.4.0PHP &gt;=5.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/9cbcbe685af90849bdd806d22ba8c315093bdeb6b2c46c874108b69f81c23038?d=identicon)[gtrias](/maintainers/gtrias)

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

---

Top Contributors

[![predominant](https://avatars.githubusercontent.com/u/24568?v=4)](https://github.com/predominant "predominant (46 commits)")[![cake17](https://avatars.githubusercontent.com/u/1652972?v=4)](https://github.com/cake17 "cake17 (26 commits)")[![AD7six](https://avatars.githubusercontent.com/u/33387?v=4)](https://github.com/AD7six "AD7six (25 commits)")[![renan](https://avatars.githubusercontent.com/u/28046?v=4)](https://github.com/renan "renan (24 commits)")[![ceeram](https://avatars.githubusercontent.com/u/111448?v=4)](https://github.com/ceeram "ceeram (20 commits)")[![antograssiot](https://avatars.githubusercontent.com/u/4977112?v=4)](https://github.com/antograssiot "antograssiot (19 commits)")[![elboletaire](https://avatars.githubusercontent.com/u/153305?v=4)](https://github.com/elboletaire "elboletaire (13 commits)")[![dereuromark](https://avatars.githubusercontent.com/u/39854?v=4)](https://github.com/dereuromark "dereuromark (12 commits)")[![lorenzo](https://avatars.githubusercontent.com/u/37621?v=4)](https://github.com/lorenzo "lorenzo (10 commits)")[![ADmad](https://avatars.githubusercontent.com/u/142658?v=4)](https://github.com/ADmad "ADmad (10 commits)")[![jrbasso](https://avatars.githubusercontent.com/u/26548?v=4)](https://github.com/jrbasso "jrbasso (8 commits)")[![markstory](https://avatars.githubusercontent.com/u/24086?v=4)](https://github.com/markstory "markstory (7 commits)")[![fiblan](https://avatars.githubusercontent.com/u/728975?v=4)](https://github.com/fiblan "fiblan (5 commits)")[![lenzcom](https://avatars.githubusercontent.com/u/5826963?v=4)](https://github.com/lenzcom "lenzcom (4 commits)")[![cdburgess](https://avatars.githubusercontent.com/u/216284?v=4)](https://github.com/cdburgess "cdburgess (4 commits)")[![dmromanov](https://avatars.githubusercontent.com/u/299059?v=4)](https://github.com/dmromanov "dmromanov (3 commits)")[![cewi](https://avatars.githubusercontent.com/u/1643900?v=4)](https://github.com/cewi "cewi (3 commits)")[![msadouni](https://avatars.githubusercontent.com/u/38374?v=4)](https://github.com/msadouni "msadouni (3 commits)")[![fahad19](https://avatars.githubusercontent.com/u/20046?v=4)](https://github.com/fahad19 "fahad19 (2 commits)")[![atkrad](https://avatars.githubusercontent.com/u/351364?v=4)](https://github.com/atkrad "atkrad (2 commits)")

---

Tags

i18nl10ncakephplocalized

### Embed Badge

![Health badge](/badges/ciricihq-localized/health.svg)

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

###  Alternatives

[moment/moment

Parse, validate, manipulate, and display dates in JavaScript.

48.1k2.1M37](/packages/moment-moment)[symfony/intl

Provides access to the localization data of the ICU library

2.6k199.8M1.1k](/packages/symfony-intl)[timrwood/moment

Parse, validate, manipulate, and display dates in JavaScript.

48.0k17.2k](/packages/timrwood-moment)[cakephp/localized

CakePHP Localized Plugin

218595.6k5](/packages/cakephp-localized)[gettext/languages

gettext languages with plural rules

7530.3M11](/packages/gettext-languages)[aplus/language

Aplus Framework Language Library

2351.7M15](/packages/aplus-language)

PHPackages © 2026

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