be-interactive / laravel-vue-translation
A package to have Laravel translation feature in VueJs
Installs: 561
Dependents: 0
Suggesters: 0
Security: 0
pkg:composer/be-interactive/laravel-vue-translation
README
Vue 3 package to use your Laravel translations in your vue templates.
Get started
install the package via composer
composer require be-interactive/laravel-vue-translation
How to use
<?php
$translations = BeTranslate::getTranslations();
?>
How to switch the languages?
This will get the current language form the document lang attribute
<html lang="en">
Uses Fallback Locale
To interact same like Laravel trans() insert in your layout:
<meta name="fallback_locale" content="{{ config('app.fallback_locale') }}">