Provides tools for localization and delocalization of the currently navigated url by adding or removing a named query param dedicated for language.
language/src/url-localization/localizers/query-params-url-localizer.ts
Properties |
|
Methods |
|
constructor(undefined: UrlLocalizationConfig, urlReflection: UrlReflectionService)
|
||||||||
Parameters:
|
||||||||
Protected composeUrl | ||||||||
composeUrl(routeUrl: string)
|
||||||||
Concats the host url and the specified route url to compose a fully qualified url. Uses the host url provided by the url reflection service.
Parameters:
Returns:
string
The fully qualified url composed of the host url defined by the url reflection service and the specified route url. |
||||||||
delocalize |
delocalize()
|
Inherited from
UrlLocalizer
|
Delocalizes the currently navigated url by removing the query param specifying the language.
Returns:
string
The currently navigated url without the query param for language. |
localize | ||||||||
localize(lang: string)
|
||||||||
Inherited from
UrlLocalizer
|
||||||||
Localizes the currently navigated url by adding or updating the query param specifying the language.
Parameters:
Returns:
string
The currently navigated url localized into the specified language. |
||||||||
Protected parseUrlTree |
parseUrlTree()
|
Returns the
Returns:
UrlTree
The |
Protected replaceLanguageParam | ||||||||||||
replaceLanguageParam(params: any, lang: string)
|
||||||||||||
Updates the language param in a query params object.
Parameters:
Returns:
any
The updated query params object. |
||||||||||||
Protected replaceQueryParamsInUrlTree | ||||||||||||
replaceQueryParamsInUrlTree(url: UrlTree, newParams: literal type)
|
||||||||||||
Replaces the query params in a url tree object.
Parameters:
Returns:
UrlTree
The updated url tree object. |
||||||||||||
Public Readonly paramName |
Type: string
|
The name of the query parameter specifying the language. |