ForCultureAsync(CultureInfo, UrlType)

Gets the url for the current request page with a different culture.

public async ValueTask<string> ForCultureAsync(CultureInfo culture, UrlType type = 1)
Returns:
ValueTask<string>

Parameters

culture CultureInfo

The culture to request the url for. If this is the same as the current request culture, this method returns the canonical url of the current request.

type UrlType

The url format type to return.

ForCultureAsync(string, UrlType)

Gets the url for the current request page for the specified culture.

public ValueTask<string> ForCultureAsync(string cultureName, UrlType type = 1)
Returns:
ValueTask<string>

Parameters

cultureName string

The culture name to request the url for. If this is the same as the current request culture, this method returns the canonical url of the current request.

type UrlType

The url format type to return.

In this article