2017 © Pedro Peláez
 

cakephp-plugin localized

CakePHP Localized Plugin

image

ciricihq/localized

CakePHP Localized Plugin

  • Tuesday, May 10, 2016
  • by gtrias
  • Repository
  • 1 Watchers
  • 0 Stars
  • 145 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 171 Forks
  • 0 Open issues
  • 15 Versions
  • 0 % Grown

The README.md

CakePHP Localized plugin

Build Status License Total Downloads, (*1)

This plugin contains various localized validation classes for specific countries., (*2)

Requirements

The master branch has the following requirements:, (*3)

  • CakePHP 3.1.0 or greater.
  • PHP 5.4.16 or greater.

Installation

You can install this plugin into your CakePHP application using composer., (*4)

The recommended way to install composer packages is:, (*5)

composer require cakephp/localized

Load your plugin using, (*6)

bin/cake plugin load Cake/Localized

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

Model validation

Localized validation classes can be used for validating model fields., (*8)

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, (*9)

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/<locale>/cake.po, (*10)

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., (*11)

Validation methods

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

  • 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., (*13)

Issues with Localized

If you have issues with Localized, you can report them at github.com/cakephp/localized/issues., (*14)

The Versions

10/05 2016

dev-f/ca-translations

dev-f/ca-translations https://github.com/cakephp/localized

CakePHP Localized Plugin

  Sources   Download

MIT

The Requires

 

The Development Requires

cakephp i18n l10n localized

10/05 2016

dev-f/update-es-translations

dev-f/update-es-translations https://github.com/cakephp/localized

CakePHP Localized Plugin

  Sources   Download

MIT

The Requires

 

The Development Requires

cakephp i18n l10n localized

27/04 2016

dev-master

9999999-dev https://github.com/cakephp/localized

CakePHP Localized Plugin

  Sources   Download

MIT

The Requires

 

The Development Requires

cakephp i18n l10n localized

27/04 2016

dev-f/person-id

dev-f/person-id https://github.com/cakephp/localized

CakePHP Localized Plugin

  Sources   Download

MIT

The Requires

 

The Development Requires

cakephp i18n l10n localized

09/04 2016

dev-b/strange-numbers

dev-b/strange-numbers https://github.com/cakephp/localized

CakePHP Localized Plugin

  Sources   Download

MIT

The Requires

 

The Development Requires

cakephp i18n l10n localized

09/04 2016

dev-b/es-numbers-with-7

dev-b/es-numbers-with-7 https://github.com/cakephp/localized

CakePHP Localized Plugin

  Sources   Download

MIT

The Requires

 

The Development Requires

cakephp i18n l10n localized

26/08 2015

2.x-dev

2.9999999.9999999.9999999-dev https://github.com/cakephp/localized

CakePHP Localized Plugin

  Sources   Download

MIT

The Requires

 

cakephp i18n l10n localized

26/08 2015

2.7.0

2.7.0.0 https://github.com/cakephp/localized

CakePHP Localized Plugin

  Sources   Download

MIT

The Requires

 

cakephp i18n l10n localized

19/05 2015

2.6.1

2.6.1.0 https://github.com/cakephp/localized

CakePHP Localized Plugin

  Sources   Download

MIT

The Requires

 

cakephp i18n l10n localized

04/04 2015

2.6.0

2.6.0.0 https://github.com/cakephp/localized

CakePHP Localized Plugin

  Sources   Download

MIT

The Requires

 

cakephp i18n l10n localized

17/01 2015

2.5.0

2.5.0.0 https://github.com/cakephp/localized

CakePHP Localized Plugin

  Sources   Download

MIT

The Requires

 

cakephp i18n l10n localized

01/12 2014

2.4.0

2.4.0.0 https://github.com/cakephp/localized

CakePHP Localized Plugin

  Sources   Download

MIT

The Requires

 

cakephp i18n l10n localized

30/07 2014

2.3.0

2.3.0.0 https://github.com/cakephp/localized

CakePHP Localized Plugin

  Sources   Download

MIT

The Requires

 

cakephp i18n l10n localized

16/07 2014

2.2.0

2.2.0.0 https://github.com/cakephp/localized

CakePHP Localized Plugin

  Sources   Download

MIT

The Requires

 

cakephp i18n l10n localized

06/12 2013

2.1.0

2.1.0.0 https://github.com/cakephp/localized

CakePHP Localized Plugin

  Sources   Download

MIT

The Requires

 

cakephp i18n l10n localized