Support frontend custom l10n text

This commit is contained in:
Pig Fang 2018-09-15 17:14:20 +08:00
parent eedb7e8449
commit 9def3808e3

View File

@ -1,7 +1,13 @@
@if (file_exists(public_path('langs/'.config('app.locale').'.js')))
<script src="{{ url('public/langs/'.config('app.locale').'.js') }}"></script>
@if (file_exists(public_path($path = 'langs/'.config('app.locale').'.js')))
<script src="{{ url('public/'.$path) }}"></script>
@if (file_exists(resource_path($path = 'lang/overrides/'.config('app.locale').'/locale.js')))
<script src="{{ url('resources/'.$path) }}"></script>
@endif
@else
<script src="{{ url('public/langs/'.config('app.fallback_locale').'.js') }}"></script>
@if (file_exists(resource_path($path = 'lang/overrides/'.config('app.fallback_locale').'/locale.js')))
<script src="{{ url('resources/'.$path) }}"></script>
@endif
@endif
<script src="{{ webpack_assets('index.js') }}"></script>