PHPackages                             aist/aist-locale - 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. aist/aist-locale

ActiveZf2-module[Localization &amp; i18n](/categories/localization)

aist/aist-locale
================

Locale Module for ZF2 Application.

012PHP

Since Aug 25Pushed 10y ago1 watchersCompare

[ Source](https://github.com/ma-si/aist-locale)[ Packagist](https://packagist.org/packages/aist/aist-locale)[ RSS](/packages/aist-aist-locale/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

AistLocale [![SensioLabsInsight](https://camo.githubusercontent.com/af5d2e729a124b1ab55eb655578a8b62e7d65496fa1a0c32a1e4d5c5bc6683ac/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f33376663363932332d363438332d346661302d616633312d6639653039383436666366362f736d616c6c2e706e67)](https://insight.sensiolabs.com/projects/37fc6923-6483-4fa0-af31-f9e09846fcf6)
=================================================================================================================================================================================================================================================================================================================================================================================================

[](#aistlocale-)

A Zend Framework 2 Module.

[![Build Status](https://camo.githubusercontent.com/d06a18cf020f447825ba85b1f786d532689c0975b7debc5fc845c6e3034653c7/68747470733a2f2f7472617669732d63692e6f72672f6d612d73692f616973742d6c6f63616c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/ma-si/aist-locale)[![Total Downloads](https://camo.githubusercontent.com/a6ec7388537b363a0f5775dcc7449dd1fabd8ed9097b76ee243c09f137b2c6cd/68747470733a2f2f706f7365722e707567782e6f72672f616973742f616973742d6c6f63616c652f646f776e6c6f616473)](https://packagist.org/packages/aist/aist-locale)[![Dependency Status](https://camo.githubusercontent.com/767be0bd762b244b99145125b59f2519137a4ca163b92464a668ab10c01cb67a/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f757365722f70726f6a656374732f3535646232366263386439633462303031383030303562352f62616467652e7376673f7374796c653d666c6174)](https://www.versioneye.com/user/projects/55db26bc8d9c4b00180005b5)[![Code Climate](https://camo.githubusercontent.com/550f889fadfad0213e724b825da3abcd6a72795daadaf31eeacb7d7824569ec7/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f6d612d73692f616973742d6c6f63616c652f6261646765732f6770612e737667)](https://codeclimate.com/github/ma-si/aist-locale)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/2c3a99ac377c216571d0edff71fd2626cb444da4c30f19c72182c24643e68b2e/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d612d73692f616973742d6c6f63616c652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/ma-si/aist-locale/?branch=master)[![Stories in Ready](https://camo.githubusercontent.com/5873e58e18acbf01a6f62a4007f3eccdd650d6a679c97625280c11be19d0922b/68747470733a2f2f62616467652e776166666c652e696f2f6d612d73692f616973742d6c6f63616c652e7376673f6c6162656c3d7265616479267469746c653d5265616479)](http://waffle.io/ma-si/aist-locale)[![License](https://camo.githubusercontent.com/43a757fb113e25fe89cbe6d7eae524671a098ffd3b17e11c9b24467dc6214854/68747470733a2f2f706f7365722e707567782e6f72672f616973742f616973742d6c6f63616c652f6c6963656e7365)](https://packagist.org/packages/aist/aist-locale)

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

[](#installation)

Installation of this module uses composer. For composer documentation, please refer to [getcomposer.org](http://getcomposer.org/).

1. Install the module via composer by running: ```
    php composer.phar require aist/aist-locale
    ```

    or download it directly from github and place it in your application's `module/` directory.
2. Add the `AistLocale` module to the module section of your `config/application.config.php`
3. Copy `aist-locale.global.php.dist` to `./config/autoload/aist-locale.global.php`

Configuration
-------------

[](#configuration)

This module provides additional configuration extending I18n. Here is a list of the config keys.

- `locale` - Default language.
- `plural_rule` - Plural rules.
- `check_agent` - Match against user agent prioritized languages.
- `supported` - Supported languages.
- `translation_file_patterns` -

    ```
      'locale' => 'pl_PL',
      'plural_rule' => 'nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10
