Skip to content
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

Fixing app crashing when locale not null #27

Merged
merged 1 commit into from
Feb 18, 2023

Conversation

DiggesT
Copy link
Collaborator

@DiggesT DiggesT commented Feb 14, 2023

The problem was export const i18n = i18next.use... is not creating a new instance (i18n had type any, means i18n.changeLanguage() can't be call). We should use i18next.createInstance.

Also i tested it with my project, and there is was a problem with other global instance of i18next (used in my app). One of the instances was dominant, so the second didn't work correctly. To avoid it we should use I18nextProvider to separate from each other.

Solution for #24 and #25.

Please review and test it before merge.
Hope it help.

@DiggesT DiggesT changed the title Fixing app crush when locale not null Fixing app crashing when locale not null Feb 14, 2023
@ozanyurtsever ozanyurtsever merged commit 2cee46d into ozanyurtsever:master Feb 18, 2023
@DiggesT DiggesT deleted the fix/lang branch March 10, 2023 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants