PHP code example of seiger / slang

1. Go to this page and download the library: Download seiger/slang library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

seiger / slang example snippets


{{evo()->getConfig('lang')}}
or
{{evo()->getLocale()}}

{{evo()->getConfig('s_lang_default')}}

{{evo()->getConfig('s_lang_default')}}

@lang('phrase')

{!!sLang::hreflang()!!}

{{Str::upper(sLang::langSwitcher()[evo()->getConfig('lang')]['short'])}}

@foreach(sLang::langSwitcher() as $lang)
    <a href="{{$lang['link']}}">{{Str::upper($lang['ISO 639-1'])}}</a>
@endforeach
console
php artisan package:install
console
php artisan vendor:publish --provider="Seiger\sLang\sLangServiceProvider"
console
php artisan migrate