1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-02-22 14:27:42 +01:00
openstamanager/app/helpers.php

21 lines
299 B
PHP

<?php
/**
* Gets the current locale.
*/
function locale(): string
{
return app()->getLocale();
}
/**
* Get the language portion of the locale.
* (ex. en_GB returns en).
*/
function localeLanguage(): string
{
$locale = locale();
return substr($locale, 0, strpos($locale, '_'));
}