Introduction

The translation package contains a few utilities for Laravel's Localization utilitiesopen in new window.

Exporters

Among the available utilities are translation exporters.

$translations = $exporter->export('en', 'auth');

print_r($translations);
Array
(
    [en] => Array
        (
            [__JSON__] => Array
                (
                    [The :attribute must contain one letter.] => The :attribute must contain one letter.
                )
            [auth] => Array
                (
                    [failed] => These credentials do not match our records.
                    [password] => The provided password is incorrect.
                    [throttle] => Too many login attempts. Please try again in :seconds seconds.
                )
        )
)