<commit_before># Laravel5 Intl Translator

[![Build Status](https://travis-ci.org/Skysplit/laravel5-intl-translation.svg?branch=master)](https://travis-ci.org/Skysplit/laravel5-intl-translation)
[![Latest Stable Version](https://poser.pugx.org/skysplit/laravel5-intl-translation/v/stable)](https://packagist.org/packages/skysplit/laravel5-intl-translation)
[![Latest Unstable Version](https://poser.pugx.org/skysplit/laravel5-intl-translation/v/unstable)](https://packagist.org/packages/skysplit/laravel5-intl-translation)

- [Introduction](#introduction)
- [Requirements](#requirements)
- [Installation](#installation)
    - [Publishing config and language files](#publishing-config-and-language-files)
        - [Currently adapted locales](#currently-adapted-locales)
- [Usage examples](#usage-examples)
    - [Placeholders](#placeholders)
    - [Select](#select)
    - [Plurals](#plurals)
        - [Plural offset](#plural-offset)
- [Formatting in details](#formatting-in-details)

# Introduction
**Laravel5 Intl Translator** uses php-intl extension to provide translation for your application.

Please mind that this package **breaks framework default behaviour for validators**.

Due to `MessageFormatter::formatMessage` method, `Validator::replacer` method should return **array of parameters as *key-value* pair**, instead replacing placeholders in message.

Besides that `app('translator')->get($key)` always returns message in raw format (unparsed). Translated messages are returned by:

```php
app('translator')->trans($key)
app('translator')->formatMessage($locale, $message, $params)
```

# Requirements
- Laravel 5.2
- php-intl extension installed

Please feel free to contribute to this package for other Laravel versions support!

# Installation

If you do not have **php-intl** extension you can install it by following command (Ubuntu, Debian)
```bash
$ sudo apt-get install php-intl
```

If you have other OS, you can use it's respective package manager


---

```bash
composer require skysplit/laravel5-intl-translation@~1.0
```

In your `config/app.php` providers  
Remove line
```php
Illuminate\Translation\TranslationServiceProvider::class,
Illuminate\Validation\ValidationServiceProvider::class,<commit_msg>[skip ci] Update installation readme error<commit_after># Laravel5 Intl Translator

[![Build Status](https://travis-ci.org/Skysplit/laravel5-intl-translation.svg?branch=master)](https://travis-ci.org/Skysplit/laravel5-intl-translation)
[![Latest Stable Version](https://poser.pugx.org/skysplit/laravel5-intl-translation/v/stable)](https://packagist.org/packages/skysplit/laravel5-intl-translation)
[![Latest Unstable Version](https://poser.pugx.org/skysplit/laravel5-intl-translation/v/unstable)](https://packagist.org/packages/skysplit/laravel5-intl-translation)

- [Introduction](#introduction)
- [Requirements](#requirements)
- [Installation](#installation)
    - [Publishing config and language files](#publishing-config-and-language-files)
        - [Currently adapted locales](#currently-adapted-locales)
- [Usage examples](#usage-examples)
    - [Placeholders](#placeholders)
    - [Select](#select)
    - [Plurals](#plurals)
        - [Plural offset](#plural-offset)
- [Formatting in details](#formatting-in-details)

# Introduction
**Laravel5 Intl Translator** uses php-intl extension to provide translation for your application.

Please mind that this package **breaks framework default behaviour for validators**.

Due to `MessageFormatter::formatMessage` method, `Validator::replacer` method should return **array of parameters as *key-value* pair**, instead replacing placeholders in message.

Besides that `app('translator')->get($key)` always returns message in raw format (unparsed). Translated messages are returned by:

```php
app('translator')->trans($key)
app('translator')->formatMessage($locale, $message, $params)
```

# Requirements
- Laravel 5.2
- php-intl extension installed

Please feel free to contribute to this package for other Laravel versions support!

# Installation

If you do not have **php-intl** extension you can install it by following command (Ubuntu, Debian)
```bash
$ sudo apt-get install php-intl
```

If you have other OS, you can use it's respective package manager


---

```bash
composer require skysplit/laravel5-intl-translation=~1.0
```

In your `config/app.php` providers  
Remove line
```php
Illuminate\Translation\TranslationServiceProvider::class,
Illuminate\Validation\ValidationServiceProvider::class,
{'fraction_non_alphanumeric': 0.13366005791935842, 'fraction_numerical': 0.0057919358431721985, 'mean_word_length': 5.6420118343195265, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 12, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1581006', 'n_tokens_mistral': 1399, 'n_tokens_neox': 1313, 'n_words': 328}