PHPackages                             motia/laravel-translations-port - 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. motia/laravel-translations-port

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

motia/laravel-translations-port
===============================

Import/Export your laravel translations(including the missing ones!) to/from your separate frontend apps.

0.2.0(7y ago)047MITPHP

Since Mar 10Pushed 6y ago1 watchersCompare

[ Source](https://github.com/motia/laravel-translations-port)[ Packagist](https://packagist.org/packages/motia/laravel-translations-port)[ RSS](/packages/motia-laravel-translations-port/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (2)Versions (3)Used By (0)

Laravel Translations Exporter
=============================

[](#laravel-translations-exporter)

This package comes with a translation manager [laravel-translation-manager](https://github.com/vsch/laravel-translation-manager) and gives it the ability to import/export and a translation group to `json` or `yaml`.

Setup
-----

[](#setup)

- Install the package.

```
composer require motia/laravel-translations-port

```

- (optional if `autodiscovery` is on) Add the service provider `Motia\TranslationsPort\TranslationsPortProvider`
- Publish the config file using the command

```
php artisan vendor:publish --provider="Motia\TranslationsPort\TranslationsPortProvider"

```

- Setup and configure [vsch/laravel-translation-manager](https://github.com/vsch/laravel-translation-manager)
- (optional) if you want to use `yaml` format run `composer install "symfony/yaml" "^4.0"`

Usage
-----

[](#usage)

- Import translations from file to database

```
php artisan trans:import

```

- Export translations from database to file

```
php artisan trans:import

```

- Missing translations This package comes with a controller to add missing translations and a helper function to add it to your routes.

```
// routes/api.php
