Rewrites the URL according to the localization rules and the currently active culture. By default, MonoX localized URLs has the string of the form "/lng/en-US" and MonoX extracts the culture name from such strings. However, the end user can choose the custom scheme, in case of which the InitializeCulture in the BasePage has to be overriden to set Thread.CurrentCulture and CurrentUICulture to the desired value, and then the IloCalizationUrlRewriter can be implemented to reflect the custom rewriting rules.

Namespace: MonoSoftware.MonoX.Localization
Assembly: MonoX (in MonoX.dll) Version: 5.1.40.5065 (5.1.40.5065)

Syntax

C#
string RewriteUrl(
	string originalLink,
	string cultureName,
	bool addLocalizationSpecificUrlPartToQeryString
)
Visual Basic
Function RewriteUrl ( 
	originalLink As String,
	cultureName As String,
	addLocalizationSpecificUrlPartToQeryString As Boolean
) As String
Visual C++
String^ RewriteUrl(
	String^ originalLink, 
	String^ cultureName, 
	bool addLocalizationSpecificUrlPartToQeryString
)
F#
abstract RewriteUrl : 
        originalLink : string * 
        cultureName : string * 
        addLocalizationSpecificUrlPartToQeryString : bool -> string 

Parameters

originalLink
Type: System..::..String
URL to rewrite.
cultureName
Type: System..::..String
Culture name
addLocalizationSpecificUrlPartToQeryString
Type: System..::..Boolean
Do not rewrite the link but rather add the localization url part to the query parameters

Return Value

Type: String
Rewritten URL.

See Also