2017 © Pedro Peláez
 

library php-i18n

Simple I18N library for PHP

image

robotdance/php-i18n

Simple I18N library for PHP

  • Tuesday, June 28, 2016
  • by MarcosMenegazzo
  • Repository
  • 1 Watchers
  • 0 Stars
  • 89 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 9 Versions
  • 0 % Grown

The README.md

PHP-I18n

Code Climate Test Coverage Issue Count Build Status, (*1)

PHP-I18n is a simple I18N and L10n library., (*2)

Setup

PHP-I18n uses Composer as dependency management tool., (*3)

$ composer install, (*4)

Use

Create a folder called config/locales at your app/module, and put your locale YAML files there. (an example of valid YAML file can found in the source). Then call I18n::t, in one of the ways below., (*5)

Simple key/value lookup

$translated = I18n::t('example_message');

Locale override

$translated = I18n::t('example_message', [], 'pt_BR');

Injecting arguments

$translated = I18n::t('hello_message', ['user' => 'Bob']); // 'Hello Bob'

Note about formatting currently the library does not apply formatting to arguments., (*6)

Localisation

Create a section 'l10n' on your locale file and follow the source standards., (*7)

$value = I18n::l(true);    // 'verdadeiro'
$value = I18n::l(123.45); // '123,45'

Running tests

$ ./bin/phpunit, (*8)

Contribute

Fork, write tests, code, submit pull request. Coverage must remains at 100%., (*9)

References

PHP the right way Fixing PHP errors automatically PHP SPL Exceptions What exception subclasses are buit in, (*10)

The Versions

28/06 2016

dev-master

9999999-dev

Simple I18N library for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marcos Menegazzo

php library i18n

28/06 2016

v0.0.8

0.0.8.0

Simple I18N library for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marcos Menegazzo

php library i18n

13/06 2016

v0.0.7

0.0.7.0

Simple I18N library for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marcos Menegazzo

php library i18n

10/06 2016

v0.0.6

0.0.6.0

Simple I18N library for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marcos Menegazzo

php library i18n

10/06 2016

v0.0.5

0.0.5.0

Simple I18N library for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marcos Menegazzo

php library i18n

02/06 2016

v0.0.4

0.0.4.0

Simple I18N library for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marcos Menegazzo

php library i18n

01/06 2016

v0.0.3

0.0.3.0

Simple I18N library for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marcos Menegazzo

php library i18n

01/06 2016

v0.0.2

0.0.2.0

Simple I18N library for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marcos Menegazzo

php library i18n

01/06 2016

v0.0.1

0.0.1.0

Simple I18N library for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marcos Menegazzo

php library i18n