{"repo":"rmariuzzo/Laravel-JS-Localization","free":true,"listed":false,"github":"https://github.com/rmariuzzo/Laravel-JS-Localization","clone":"git clone https://github.com/rmariuzzo/Laravel-JS-Localization.git","description":"🌐 Convert your Laravel messages and consume them in the front-end!","language":"PHP","stars":606,"topics":["php","javascript","localization","i18n","l10n","internationalization","laravel","laravel-package","laravel-5-package","laravel-4-package"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"This package convert all your localization messages from your Laravel app to JavaScript with a small library to interact with those messages following a very similar syntax you are familiar with. Features - Support Laravel 4.2, 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 6.x, 7.x and 8.x! - Includes Lang.js (a thin library highly inspired on Laravel's Translator class). - Allow to specify desired lang files to be converted to JS. - Lang.js API is based on Laravel's Translator class. No need to learn a whole API. :star: Webpack user? Try the new and shiny Laravel localization loader for Webpack! Installation In your Laravel app go to config/app.php and add the following service provider: Usage The Laravel-JS-Localization package provides a command that generate the JavaScript version of all your messages found at: app/lang (Laravel 4) or resources/lang (Laravel 5) directory. The resulting JavaScript file will contain all your messages plus Lang.js (a thin library highly inspired on Laravel's Translator class). Generating JS messages Specifying a custom target Compressing the JS file Specifying a custom source folder Output a JSON file instead. Configuration First, publish the default package's configuration file running: The configuration will be published to config/localization-js.php . You may edit this file to define the messages you need in your Javascript code. Just edit the messages array in the config file. Empty messages array will include all the language files in build . To make o","default_branch":null,"files":null,"tree":[],"storefront":"/r/rmariuzzo","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/rmariuzzo/Laravel-JS-Localization/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}