Skip to content

How to translate react-select's aria-live? #5632

Closed Answered by ericanoronhavv
ericanoronhavv asked this question in Q&A
Discussion options

You must be logged in to vote

Coming back just in case someone have the same doubt I had. Actually there is a manual alternative to solve this translation issue, using AriaLiveMessage. The documentation example wasn't so clear to me at the time, but it is quite simple.
As you can see in the CustomAriaLive example, you can manage to create a similar defaultAriaLiveMessages object in your custom select component and translate it yourself. Then you can set the return to get the attribute like ariaLiveMessages={defaultAriaLiveMessages}.

I was wondering if this solution could be automatic, getting the language specified within the project and manage to change texts, that's why I primirily started this discussion, however t…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ericanoronhavv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant