lang/i18n.go
func URL(url, prefix string, data ContextValue) string {
	if data.Current.IsRoot() {
		return url
	}

	if prefix == "" {
		prefix = "/"
	} else if prefix[len(prefix)-1] != '/' {
		prefix += "/"
	}

	if url == "" {
		url = "/"
	}

	if url[0] != '/' {
		url = "/" + url
	}

	return prefix + data.Current.String() + url
}
func URL(url, prefix string, data ContextValue) string {
	if data.Current.IsRoot() {
		return url
	}

	if prefix == "" {
		prefix = "/"
	} else if prefix[len(prefix)-1] != '/' {
		prefix += "/"
	}

	if url == "" {
		url = "/"
	}

	if url[0] != '/' {
		url = "/" + url
	}

	return prefix + data.Current.String() + url
}
// URL prefixes a url string with the request language.