Type Definitions
object
# UseTranslationResponse
Extends TranslateFunctions. Apart from that it also returns all the properties
defined below.
import { useTranslation } from 'adminjs'
const MyComponent = () => {
const { translateButton } = useTranslation()
return (
<Box>
<Button variant="primary" onClick={...}>{translateButton('save')}<Button>
</Box>
)
}
Properties:
Name | Type | Description |
---|---|---|
... |
TranslateFunction
|
All functions defined in TranslateFunctions |
t |
TFunction
|
|
i18n |
i18n
|
Current i18n instance. |
ready |
boolean
|
Indicates if translation system is ready. In AdminJS it is always ready :). |