Introduction
When you need to export your application's available translations, you can use the Exporter
component. It offers a "profile-based" approach, in which you can have multiple exporter profiles.
Example
use Aedart\Translation\Traits\TranslationsExporterManagerTrait;
class MyController
{
use TranslationsExporterManagerTrait;
public function index()
{
$exporter = $this->getTranslationsExporterManager()
->profile();
$translations = $exporter->export(['en', 'en-uk']);
// ...do something with the translations...
}
}