Skip to content
This repository has been archived by the owner on Apr 21, 2024. It is now read-only.

feat: option translate labels #35

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

RodriguesCosta
Copy link

resolve #17

What do you think of this implementation, so it can be translated into any language!

@thomas-coldwell
Copy link
Owner

Thanks for the PR! Agreed this is definitely needed to support multiple languages. Just having a look through your code and I see you have put the variable bits of text into state - was this done on purpose over just passing them down as props from the parent component?

example/App.tsx Outdated
@@ -68,6 +68,17 @@ export default function App() {
console.log(result);
}}
throttleBlur={false}
textTranslateOptions={{
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a better name might be customLabels ?

@RodriguesCosta
Copy link
Author

I changed textTranslateOptions to customLabelsOptions.

I found it easier to use a state than to pass it directly as property.

@mmelilli
Copy link

Are you going to merge this? :)

@jakobsuckow
Copy link

Hi just wanted to ask when this is going to be merged ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom UI component
4 participants