The base class for url localization implementors. This can be used as an injectable token to get a hold of the currently configured url localizer class.
language/src/url-localization/localizers/url-localizer.ts
Methods |
|
constructor(urlReflection: UrlReflectionService)
|
||||||||
Creates an instance of UrlLocalizer.
Parameters:
|
||||||||
Public Abstract delocalize |
delocalize()
|
Reads the Currently navigated url and delocalizes it. If the url is already delocalized, return the url unchanged.
Returns:
string
The delocalized url. |
Public Abstract localize | ||||||||
localize(lang: string)
|
||||||||
Reads the currently navigated url and localizes it to the specified language. If the url is already localized with a different language, updates the language. If the url is already localized with the specified language, returns the url unchanged.
Parameters:
Returns:
string
The localized url. |
||||||||