Download the PHP package radig/locale without Composer

On this page you can find all versions of the php package radig/locale. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package locale

h1. CakePHP Locale !https://travis-ci.org/radig/locale.png?branch=master(Build Status)!:https://travis-ci.org/radig/locale !https://coveralls.io/repos/radig/locale/badge.svg(Coverage Status)!:https://coveralls.io/r/radig/locale

That plugin allow your users to input localized data (like dates and decimals) while kept consistency at database-level.

It's also included a Helper to output a non-localized data in users locale format.

Some static libs are delivered in bundle and are used by Helper and Behavior, at the same time allow you to work with localized data where you need (like shell).

Este plugin permite que usuários de seu sistema visualizem e insiram dados em formatos locais/regionais ao mesmo tempo que garante a consistência dos dados convertendo-o para um formato aceito pelo banco de dados escolhido.

h2. Autor e Copyright

h2. Observações/Observations

h2. Como usar / How begin

bc. setlocale(LC_ALL, 'pt_BR.utf-8', 'pt_BR', 'pt-br', 'portuguese');

h3. Utilizando o Behavior

bc. $actsAs = ['Locale.Locale'];

h3. Utilizando o Helper

bc. $helpers = ['Locale.Locale'];

bc. echo $this->Locale->dateTime('2010-08-26');

h3. Além do Behavior e Helper...

Agora você também pode trabalhar com a normalização de desnormalização de dados em diferentes contextos de sua aplicação (como em Shells), bastando para isso carregar as libs Localize e Unlocalize, de acordo com suas necessidades.

bc. App::uses('Localize', 'Locale.Lib');

Elas são todas estáticas, então você deve usa-las sem se preocupar com instâncias:

bc. $localizada = Localize::date('2012-04-16');

Desta forma, a variável $localizada armazenará "16/04/2012" caso seu locale esteja definido para pt_BR

h3. Resolvendo problemas

h4. '[Notice] Undefined index C: ...'

Este erro ocorre quando o locale que você configurou no seu bootstrap não está disponível em seu SO. No caso do pt_BR, ele não costuma vir habilitado no Ubuntu Server (e me parece que no Desktop também). Para resolver o problema você possuí pelo menos duas alternativas:

Em uma linha (pode funcionar em outras distros):

bc. sudo locale-gen --no-purge --lang pt_BR

Deixando para o SO gerenciar:

@sudo vi /var/lib/locales/supported.d/local@

Acrescente o locale pt_BR.UTF-8 UTF-8

@sudo dpkg-reconfigure locales@

Reinicie o Apache/PHP-FPM

h4. 'Notice (8): Undefined index: [APP\Plugin\Locale\Lib\Localize.php, line 41]'

Outro erro relacionado ao locale do sistema que já foi reportado na [issue #2]:https://github.com/radig/locale/issues/2 e ocorre sempre na primeira execução do script (antes de haver cache de APC/Arquivo...).

A solução consiste em incluir o locale 'portuguese' quando configurar o setlocale.

bc. setlocale(LC_ALL, 'pt_BR.utf-8', 'pt_BR', 'pt-br', 'portuguese');


All versions of locale with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
composer/installers Version ~1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package radig/locale contains the following files

Loading the files please wait ....