mirror of
https://github.com/arikchakma/maily.to.git
synced 2026-04-25 22:25:51 +03:00
[GH-ISSUE #33] Support for i18n #242
Labels
No labels
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/maily.to#242
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @BigDog1400 on GitHub (Jan 12, 2024).
Original GitHub issue: https://github.com/arikchakma/maily.to/issues/33
The current version of this library only supports English text. I can think of different application that might need to change the text to different langs (es,en,pt, etc). What do you think about providing the library with translation?
It could be a prop to the editor instance and then internally get the translations from a JSON file. What are your thoughts on this proposed enhancement?
@arikchakma commented on GitHub (Jan 12, 2024):
Like support for different languages? or for slash command text and everything else?
@arikchakma commented on GitHub (Jan 12, 2024):
I think first we need to add
RTLsupport I think, it's really important. What do you think?@BigDog1400 commented on GitHub (Jan 12, 2024):
I think that those are different things, both valid. My initial issue was raised considering the built-in components of the library (translating elements like slash command options, placeholders, popovers, etc.). Implementing this would mainly involve modifying the existing editor components.
On the other hand, adding
RTLsupport would need updates to both the editor and the render package.I am more than willing to assist with the first part, which is adding support for translations. Let me know if you want me to make a proposal for this feature
@arikchakma commented on GitHub (Jan 12, 2024):
Yeah, we can do that. Let's go for it. I'll think about the
RTLwhenever I get some time.@BigDog1400 commented on GitHub (Jan 15, 2024):
Here is my first proposal to handle the i18n in this package https://github.com/arikchakma/maily.to/pull/34 . I usually use react-intl to handle translations in others projects, but that package relies on context and hooks, and we can't use that in a lot of places in this case. so i went with react-intl-universal which is a fork of react-intl mantained by alibaba and has the flexibility of using translations outside of react. Let me know what you think, right now there is only two langs translated, english and spanish. Also we could add a lang selector in the demo app to see how the editor changes the translations.