/plugins/<your-plugin>/src/Providers/<YourPlugin>ServiceProvider.php
. Add below code to function boot
if (defined('LANGUAGE_MODULE_SCREEN_NAME')) {
\Language::registerModule([YourPluginModel::class]);
}
Add to your theme views.
{!! apply_filters('language_switcher') !!}
If you want to custom language switcher, you can modify this file: platform/plugins/language/resources/views/partials/switcher.blade.php
If you have a fixed number of languages you can use hardcode HTML like this.
<ul>
<li>
<a href="{{ url('en') }}">
<img src="{{ url('vendor/core/images/flags/us.png') }}" title="English" alt="English">
<span>English</span>
</a>
</li>
<li >
<a href="{{ url('vi') }}">
<img src="{{ url('vendor/core/images/flags/vn.png') }}" title="Tiếng Việt" alt="Tiếng Việt">
<span>Tiếng Việt</span>
</a>
</li>
</ul>