2017 © Pedro Peláez
 

library g11n

The Titon g11n package handles the localization and internationalization of your application.

image

titon/g11n

The Titon g11n package handles the localization and internationalization of your application.

  • Monday, February 17, 2014
  • by milesj
  • Repository
  • 0 Watchers
  • 0 Stars
  • 107 Installations
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 32 Versions
  • 0 % Grown

The README.md

G11n v0.11.4 Build Status

Handles the localization (l10n) and internationalization (i18n) of your application, also known as globalization (g11n). The g11n package provides a robust and extensible way to localize messages, provide locale aware patterns and rules, translate strings, and much more., (*1)

The G11n class manages locales, translators, and the initialization via HTTP accept headers., (*2)

use Titon\G11n\Locale;

$g11n = Titon\G11n\G11n:registry();
$g11n->addLocale(new Locale('en'));
$g11n->addLocale(new Locale('fr'));
$g11n->setFallback('en');
$g11n->setTranslator(new Titon\G11n\Translator\MessageTranslator())
    ->setReader(new Titon\Io\Reader\PhpReader())
    ->setStorage(new Titon\Cache\Storage\MemcacheStorage());
$g11n->initialize();

If the route package is used in combination with the g11n package, automatic route resolving and URL locale prefixing can be achieved. The g11n LocaleRoute should also be used in place of the default Route., (*3)

$router->on('g11n', $g11n);

Fetching and translating strings is as easy as calling a single function. Of course the messages will have to exist in the resource lookup path., (*4)

$message = $g11n->translate('domain.catalog.id');
// or
$message = msg('domain.catalog.id');
// or
$message = __('id', 'catalog', 'domain');

Features

  • G11n - L10n and I18n management
  • Locale - Locale configuration
  • Translator - Message bundle parsing
  • Utility - Extends Inflector, Format, Number and Validator
  • Route - Locale aware routing

Dependencies

  • Common
  • Event
  • IO
  • Cache (optional for Translator)

Requirements

  • PHP 5.4.0
    • Intl
    • Multibyte
    • Gettext (for GettextTranslator)

To Do

  • Test gettext functionality
  • Implement TranslatableBehavior

The Versions

17/02 2014

dev-master

9999999-dev http://titon.io

The Titon g11n package handles the localization and internationalization of your application.

  Sources   Download

BSD-2

The Requires

 

The Development Requires

locale i18n message translate intl l10n g11n titon

17/02 2014

0.11.4

0.11.4.0 http://titon.io

The Titon g11n package handles the localization and internationalization of your application.

  Sources   Download

BSD-2

The Requires

 

The Development Requires

locale i18n message translate intl l10n g11n titon

14/02 2014

0.11.3

0.11.3.0 http://titon.io

The Titon g11n package handles the localization and internationalization of your application.

  Sources   Download

BSD-2

The Requires

 

The Development Requires

locale i18n message translate intl l10n g11n titon

08/02 2014

0.11.2

0.11.2.0 http://titon.io

The Titon g11n package handles the localization and internationalization of your application.

  Sources   Download

BSD-2

The Requires

 

The Development Requires

locale i18n message translate intl l10n g11n titon

06/02 2014

0.11.1

0.11.1.0 http://titon.io

The Titon g11n package handles the localization and internationalization of your application.

  Sources   Download

BSD-2

The Requires

 

The Development Requires

locale i18n message translate intl l10n g11n titon

05/01 2014

0.11.0

0.11.0.0 http://titon.io

The Titon g11n package handles the localization and internationalization of your application.

  Sources   Download

BSD-2

The Requires

 

The Development Requires

locale i18n message translate intl l10n g11n titon

05/01 2014

0.10.9

0.10.9.0 http://titon.io

The Titon g11n package handles the localization and internationalization of your application.

  Sources   Download

BSD-2

The Requires

 

The Development Requires

locale i18n message translate intl l10n g11n titon

05/01 2014

0.10.8

0.10.8.0 http://titon.io

The Titon g11n package handles the localization and internationalization of your application.

  Sources   Download

BSD-2

The Requires

 

The Development Requires

locale i18n message translate intl l10n g11n titon

01/01 2014

0.10.7

0.10.7.0 http://titon.io

The Titon g11n package handles the localization and internationalization of your application.

  Sources   Download

BSD-2

The Requires

 

The Development Requires

locale i18n message translate intl l10n g11n titon

31/12 2013

0.10.6

0.10.6.0 http://titon.io

The Titon g11n package handles the localization and internationalization of your application.

  Sources   Download

BSD-2

The Requires

 

The Development Requires

locale i18n message translate intl l10n g11n titon

29/12 2013

0.10.5

0.10.5.0 http://titon.io

The Titon g11n package handles the localization and internationalization of your application.

  Sources   Download

BSD-2

The Requires

 

The Development Requires

locale i18n message translate intl l10n g11n titon

20/10 2013

0.10.4

0.10.4.0 http://titon.io

The Titon g11n package handles the localization and internationalization of your application.

  Sources   Download

BSD-2

The Requires

 

The Development Requires

locale i18n message translate intl l10n g11n titon

18/09 2013

0.10.3

0.10.3.0 http://titon.io

The Titon g11n package handles the localization and internationalization of your application.

  Sources   Download

BSD-2

The Requires

 

The Development Requires

locale i18n message translate intl l10n g11n titon

18/09 2013

0.10.2

0.10.2.0 http://titon.io

The Titon g11n package handles the localization and internationalization of your application.

  Sources   Download

BSD-2

The Requires

 

The Development Requires

locale i18n message translate intl l10n g11n titon

18/09 2013

0.10.1

0.10.1.0 http://titon.io

The Titon g11n package handles the localization and internationalization of your application.

  Sources   Download

BSD-2

The Requires

 

The Development Requires

locale i18n message translate intl l10n g11n titon

25/08 2013

0.10.0

0.10.0.0 http://titon.io

The Titon g11n package handles the localization and internationalization of your application.

  Sources   Download

BSD-2

The Requires

 

The Development Requires

locale i18n message translate intl l10n g11n titon

05/08 2013

0.9.1

0.9.1.0 https://github.com/titon/G11n

The Titon g11n package handles the localization and internationalization of your application.

  Sources   Download

BSD-2

The Requires

 

The Development Requires

locale i18n message translate intl l10n g11n titon

05/08 2013

0.9.0

0.9.0.0 https://github.com/titon/G11n

The Titon g11n package handles the localization and internationalization of your application.

  Sources   Download

BSD-2

The Requires

 

The Development Requires

locale i18n message translate intl l10n g11n titon

10/07 2013

0.8.2

0.8.2.0 https://github.com/titon/G11n

The Titon g11n package handles the localization and internationalization of your application.

  Sources   Download

BSD-2

The Requires

 

The Development Requires

locale i18n message translate intl l10n g11n titon

10/07 2013

0.8.1

0.8.1.0 https://github.com/titon/G11n

The Titon g11n package handles the localization and internationalization of your application.

  Sources   Download

BSD-2

The Requires

 

The Development Requires

locale i18n message translate intl l10n g11n titon

24/06 2013

0.8.0

0.8.0.0 https://github.com/titon/G11n

The Titon g11n package handles the localization and internationalization of your application.

  Sources   Download

BSD-2

The Requires

 

The Development Requires

locale i18n message translate intl l10n g11n titon

05/06 2013

0.7.1

0.7.1.0 https://github.com/titon/G11n

The Titon g11n package handles the localization and internationalization of your application.

  Sources   Download

BSD-2

The Requires

 

The Development Requires

locale i18n message translate intl l10n g11n titon

26/04 2013

0.7.0

0.7.0.0 https://github.com/titon/G11n

The Titon g11n package handles the localization and internationalization of your application.

  Sources   Download

BSD-2

The Requires

 

The Development Requires

locale i18n message translate intl l10n g11n titon

19/04 2013

0.6.2

0.6.2.0 https://github.com/titon/G11n

The Titon g11n package handles the localization and internationalization of your application.

  Sources   Download

BSD-2

The Requires

 

The Development Requires

locale i18n message translate intl l10n g11n titon

19/04 2013

0.6.1

0.6.1.0 https://github.com/titon/G11n

The Titon g11n package handles the localization and internationalization of your application.

  Sources   Download

BSD-2

The Requires

 

The Development Requires

locale i18n message translate intl l10n g11n titon

14/04 2013

0.6.0

0.6.0.0 https://github.com/titon/G11n

The Titon g11n package handles the localization and internationalization of your application.

  Sources   Download

BSD-2

The Requires

 

The Development Requires

locale i18n message translate intl l10n g11n titon

13/04 2013

0.5.0

0.5.0.0 https://github.com/titon/G11n

The Titon g11n package handles the localization and internationalization of your application.

  Sources   Download

BSD-2

The Requires

 

The Development Requires

locale i18n message translate intl l10n g11n titon

15/01 2013

0.4.0

0.4.0.0 https://github.com/titon/Titon.G11n

The Titon g11n package handles the localization and internationalization of your application.

  Sources   Download

BSD-2-Clause

The Requires

 

The Development Requires

locale i18n message translate intl l10n g11n titon

12/01 2013

0.3.1

0.3.1.0 https://github.com/titon/Titon.G11n

The Titon g11n package handles the localization and internationalization of your application.

  Sources   Download

BSD-2-Clause

The Requires

 

The Development Requires

locale i18n message translate intl l10n g11n titon

11/01 2013

0.3.0

0.3.0.0 https://github.com/titon/Titon.G11n

The Titon g11n package handles the localization and internationalization of your application.

  Sources   Download

BSD-2-Clause

The Requires

 

The Development Requires

locale i18n message translate intl l10n g11n titon

09/01 2013

0.2.0

0.2.0.0 https://github.com/titon/Titon.G11n

The Titon g11n package handles the localization and internationalization of your application.

  Sources   Download

BSD-2-Clause

The Requires

 

The Development Requires

locale i18n message translate intl l10n g11n titon

08/01 2013

0.1.0

0.1.0.0 https://github.com/titon/Titon.G11n

The Titon G11n package handles the localization and internationalization of your application.

  Sources   Download

BSD-2-Clause

The Requires

 

The Development Requires

locale i18n message translate intl l10n g11n titon