PHPackages                             armandsar/laravel-translationio - 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. armandsar/laravel-translationio

ActiveLibrary[Localization &amp; i18n](/categories/localization)

armandsar/laravel-translationio
===============================

Add this package to localize your Laravel application (PHP, JSON or GetText).

v1.25(2w ago)1701622[4 issues](https://github.com/armandsar/laravel-translationio/issues)[1 PRs](https://github.com/armandsar/laravel-translationio/pulls)MITPHPPHP &gt;=7.0CI failing

Since Mar 23Pushed 2w ago9 watchersCompare

[ Source](https://github.com/armandsar/laravel-translationio)[ Packagist](https://packagist.org/packages/armandsar/laravel-translationio)[ Docs](https://github.com/translation/laravel)[ RSS](/packages/armandsar-laravel-translationio/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (24)Versions (29)Used By (0)

[Translation.io](https://translation.io/laravel) client for Laravel 5.5+ to 13.x
================================================================================

[](#translationio-client-for-laravel-55-to-13x)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Build Status](https://github.com/translation/laravel/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/translation/laravel/actions/workflows/test.yml)[![Test Coverage](misc/coverage-badge.svg)](misc/coverage-badge.svg)[![Package Version](https://camo.githubusercontent.com/23cd510612c74332b291d5bf53eb136f98cb0bc2277748961d4552048606ca34/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f74696f2f6c61726176656c3f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tio/laravel)[![Downloads](https://camo.githubusercontent.com/3545e5882abfcfd72923f07ac5b956595f2933c98d9baa89e31448d83975c02c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f74696f2f6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tio/laravel)

Add this package to localize your **Laravel** application.

Use the official Laravel syntax (with [PHP](#laravel-localization-php-keyvalues) or [JSON](#laravel-localization-json-source-text) files), or use the [GetText](#gettext) syntax.

Write only the source text, and keep it synchronized with your translators on [Translation.io](https://translation.io/laravel).

[ ![Translation.io interface](https://camo.githubusercontent.com/3739639bf2e8ae42c2af127bf121dd10b1116ca988a0ea27b2ff620ceada4d0b/68747470733a2f2f7472616e736c6174696f6e2e696f2f676966732f7472616e736c6174696f6e2e676966)](https://translation.io/laravel)[Technical Demo](https://translation.io/videos/laravel.mp4) (2.5min)

Need help?

Table of contents
-----------------

[](#table-of-contents)

- [Localization syntaxes](#localization-syntaxes)
    - [Laravel Localization (PHP key/values)](#laravel-localization-php-keyvalues)
    - [Laravel Localization (JSON source text)](#laravel-localization-json-source-text)
    - [GetText](#gettext)
- [Installation](#installation)
- [Usage](#usage)
    - [Sync](#sync)
    - [Sync and Show Purgeable](#sync-and-show-purgeable)
    - [Sync and Purge](#sync-and-purge)
- [Manage Languages](#manage-languages)
    - [Add or Remove Language](#add-or-remove-language)
    - [Edit Language](#edit-language)
    - [Custom Languages](#custom-languages)
- [Change the current locale](#change-the-current-locale)
    - [Globally](#globally)
    - [Locally](#locally)
- [Frontend Localization](#frontend-localization)
    - [Using this package](#using-this-package)
    - [Using our official React &amp; JavaScript package](#using-our-official-react--javascript-package)
- [Advanced Configuration Options](#advanced-configuration-options)
    - [Ignored PHP keys](#ignored-php-keys)
- [Testing](#testing)
- [Contributing](#contributing)
- [List of clients for Translation.io](#list-of-clients-for-translationio)
    - [Ruby on Rails (Ruby)](#ruby-on-rails-ruby)
    - [Laravel (PHP)](#laravel-php)
    - [React, React Native and JavaScript](#react-react-native-and-javascript)
    - [Angular](#angular)
    - [Others](#others)
- [License](#license)

Localization syntaxes
---------------------

[](#localization-syntaxes)

### Laravel Localization (PHP key/values)

[](#laravel-localization-php-keyvalues)

The [default Laravel method to localize](https://laravel.com/docs/master/localization#using-short-keys).

```
// Regular
__('inbox.title');

// Regular with sublevel key
__('inbox.menu.title');

// Pluralization
trans_choice('inbox.messages', $number);

// Interpolation
__('inbox.hello', ['name' => $user->name]);
```

With the PHP file `lang/en/inbox.php`:

```
