web / useLocalization
Function: useLocalization() ​
useLocalization():
object
Defined in: apps/web/composables/useLocalization/useLocalization.ts:19
Returns ​
object
buildCategoryLanguagePath() ​
buildCategoryLanguagePath: (
path
) =>string
Parameters ​
path ​
string
category path that is provided by the category response to redirect after a language switch
Returns ​
string
category path that is then navigated to
Description ​
Function for wrapping the category language path.
Example ​
buildCategoryLanguagePath('')
buildCategoryMenuLink() ​
buildCategoryMenuLink: (
category
,categoryTree
) =>string
Parameters ​
category ​
CategoryTreeItem
categoryTree ​
CategoryTreeItem
[]
Returns ​
string
product path that is then navigated to
Description ​
Used to generate the category path inside the mega menu and other navigation trees.
Example ​
buildCategoryMenuLink(category, categoryTree)
buildProductLanguagePath() ​
buildProductLanguagePath: (
path
) =>string
Parameters ​
path ​
string
product path that is provided by the product response to redirect after a language switch
Returns ​
string
product path that is then navigated to
Description ​
Function for wrapping the product language path.
Example ​
buildProductLanguagePath('')
getCategoryUrlFromRoute() ​
getCategoryUrlFromRoute: (
path
) =>string
Parameters ​
path ​
string
Returns ​
string
Description ​
Used to generate the category path inside the mega menu and other navigation trees.
Example ​
getCategoryUrlFromRoute('')
isOpen ​
isOpen:
Ref
<boolean
,boolean
>
setVsfLocale() ​
setVsfLocale: (
locale
) =>void
Parameters ​
locale ​
"de"
| "en"
Returns ​
void
switchLocale() ​
switchLocale: (
language
,hideMenu
) =>Promise
<void
>
Parameters ​
language ​
"de"
| "en"
hideMenu ​
boolean
= true
Returns ​
Promise
<void
>
Description ​
Function for switching app locale.
Example ​
switchLocale('en')
toggle() ​
toggle: (
value
?) =>boolean
Parameters ​
value? ​
boolean
Returns ​
boolean