Client usage
Client usage is disabled by default because it sends some JavaScript to the browser.
Enabling any of the following features requires importing the <I18nClient/>
component.
Utility | Required features |
---|---|
t | data , translations |
getLocale | data |
getLocales | data |
getDefaultLocale | data |
getHtmlAttrs | data |
setDynamicParams | N/A, server only |
getLocalePath | data , paths |
switchLocalePath | data , paths |
getSwitcherData | data , paths |
getLocalePlaceholder | N/A, getStaticPaths only |
You can enable them in your integration config:
1i18n({2 // ...3 client: {4 data: false,5 paths: false,6 translations: false,7 }8})