sLang Seiger Lang multi language Management Module for Evolution CMS admin panel.
The work of the module is based on the use of the standard Laravel functionality for multilingualism.
- Automatic translation of phrases through Google.
- Automatic search for translations in templates.
- Multilingual tabs in resource.
- Unlimited translation languages.
Go to You /core/ folder:
cd core
Run php artisan command
php artisan package:installrequire seiger/slang "*"
php artisan vendor:publish --provider="Seiger\sLang\sLangServiceProvider"
Run make DB structure with command:
php artisan migrate
Current language:
{{evo()->getConfig('lang')}}
or
{{evo()->getLocale()}}
Default language:
{{evo()->getConfig('s_lang_default')}}
List of frontend languages by comma:
{{evo()->getConfig('s_lang_default')}}
Translation of phrases:
@lang('phrase')
Localized versions of your page for Google hreflang
{!!sLang::hreflang()!!}
Show current language anywhere with name or shortname
{{Str::upper(sLang::langSwitcher()[evo()->getConfig('lang')]['short'])}}
Implementing a Language Switcher
@foreach(sLang::langSwitcher() as $lang)
<a href="{{$lang['link']}}">{{Str::upper($lang['ISO 639-1'])}}</a>
@endforeach