Pipit: pipit_get_lang()
The function gets the language string from a URL with the patter /{lang}/my-page
.
pipit_get_lang($accepted_langs, $default_lang)
Type | Description |
---|---|
Array | Array of accepted language strings |
String | Default language if none found |
$lang = pipit_get_lang(['en', 'ru', 'ar'], 'en');