public static function siteUrl($sUri, $bUseSecure = false)
    {
        if (preg_match('/^(https?:\/\/|#)/', $sUri)) {
            //  Absolute URI; return unaltered
            return $sUri;
        } else {

            if ($bUseSecure && defined('SECURE_BASE_URL')) {
                $sBaseUrl = rtrim(SECURE_BASE_URL, '/') . '/';
            } else {
                $sBaseUrl = rtrim(BASE_URL, '/') . '/';
            }

            if (is_file($sUri) || is_dir($sUri)) {
                return $sBaseUrl . ltrim($sUri, '/');
            }

            /** @var Locale $oLocale */
            $oLocale = Factory::service('Locale');
            $sLocale = $oLocale->getUrlSegment($oLocale->get());
            $sLocale = $sLocale && $sUri ? $sLocale . '/' : $sLocale;

            return $sBaseUrl . $sLocale . ltrim($sUri, '/');

        }
    }