laravel-lang-loader
v1.0.4
Published
Loader for parse and load Laravel lang files into JS translations libraries
Downloads
34
Maintainers
Readme
npm install laravel-lang-loader
In your app.js (or app.ts) file add:
import LaravelTranslations from 'laravel-lang-loader!laravel-lang-loader';
where LaravelTranslation can be any variable name.
Configuration is provided by .json file, and it must be store in ./resource/lang with .lll.config.json
name. Minimal requirement is at least
one lang dir defined in dir
key:
// lll.config.json
{
"dir": [
"./resources/lang",
{
"path": "./app/Modules/*/resources/lang",
"namespaceFromPath": "./app/Modules/[:namespace]/resources/lang"
}
],
"php": true,
"json": true
}