/** * Transforms an hyperlink URL to include the locale specifier if the locale' selectiom mode requires it. * @param string $url * * @return string */ function href($url) { if (Config::get('app.locale_use_url')) { return Language::get() . ($url && $url != '/' ? '/' . $url : ''); } return $url == '/' ? '' : $url; }