Public function

Returns a function to translate a translation key into a string based on the current translation.

Example
const msg = useTranslation()
const label = msg('style-panel.styles')
Signature
function useTranslation(): (
  id: Exclude<string, TLUiTranslationKey> | string
) => string
References

TLUiTranslationKey

Source

packages/tldraw/src/lib/ui/hooks/useTranslation/useTranslation.tsx

useToolsuseUiEvents