firm-tan
firm-tan11mo ago

Translate the option for Select element

How do you translate the option output by useSelect for a Select element?
4 Replies
kapa.ai
kapa.ai11mo ago
Hi @silentnyte. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Hmm, I don't know enough to give you a confident answer yet. The extracts provided do not contain information on how to translate the option output by useSelect for a Select element in refine. However, you can refer to the refine documentation (https://refine.dev/docs) for more details. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai11mo ago
<@395261846862561301> kapa.ai is still learning and improving, please let us know how it did by reacting below
deep-jade
deep-jade10mo ago
Hello @silentnyte since select options coming from API, you can use useTranslate hook to manually translate labels: https://refine.dev/docs/ui-integrations/mantine/hooks/use-select/#can-i-create-the-options-manually https://refine.dev/docs/core/hooks/translate/use-translate/
useTranslate | refine
If you need to translate the texts in your own components, refine provides the useTranslate hook, It returns the translate method from i18nProvider under the hood.
useSelect | refine
useSelect hook allows you to manage Mantine's `` component when records in a resource needs to be used as select options.
firm-tan
firm-tan10mo ago
Thank you