You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But I can also modify that list during runtime using addResourceBundle and removeResourceBundle. After some amount of adds/removes, the actual list of supported languages could be very different.
What's the correct canonical way to get the list of languages that the i18next instance will currently support? I want to use that list to offer a language picker to the user and provide only the languages actually loaded into the instance. I also want to use i18next itself as a source of truth on what it can do.
The closest I found so far is to run this snippet, but it seems hacky and not ideal:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
When I start up my i18next, I can provide it with a list of languages to support:
But I can also modify that list during runtime using addResourceBundle and removeResourceBundle. After some amount of adds/removes, the actual list of supported languages could be very different.
What's the correct canonical way to get the list of languages that the i18next instance will currently support? I want to use that list to offer a language picker to the user and provide only the languages actually loaded into the instance. I also want to use i18next itself as a source of truth on what it can do.
The closest I found so far is to run this snippet, but it seems hacky and not ideal:
I also posted this question to Stack Overflow yesterday: What's the canonical way to get the list of possible languages supported by my i18next instance?
Beta Was this translation helpful? Give feedback.
All reactions