-
-
Notifications
You must be signed in to change notification settings - Fork 641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Component based localization #2191
Comments
i18next has the concept of namespaces -> https://www.i18next.com/principles/namespaces you can use key prefix as additional layer: https://www.i18next.com/overview/api#getfixedt not sure what functionality you miss - having translations beside the component in file system? |
this is what I am trying to achieve |
so my guess...find the backend that suits you best https://www.i18next.com/overview/plugins-and-utils#backends and just use |
In Vue the I18n api allows component based messages
https://kazupon.github.io/vue-i18n/guide/component.html#translation-in-functional-component
I tried looking for equivalent behaviour in I18next but could not find any so came up with this.
I am sure this could be improved upon and would appreciate some input.
https://github.com/Darkmift/ELEVATION-ITWORKS/blob/feat-i19n-tailwind/classes/react/int-tw/src/hooks/useScopedTranslation.ts
The text was updated successfully, but these errors were encountered: