is there any way to use useTranslation or withTranslation of i18next-react inside react native navigator?
right now using this code, I need to restart the app each time language changes
how can I update the title dynamically as soon as language change happens in i18next (like it happens with the useTranslation hook)?
[ScreenNames.PartnerTab]: {
screen: PartnersNavigator,
navigationOptions: {
header: null,
title: i18next.t('tabs:partners'),
gesturesEnabled: false,
tabBarIcon: createTabBarIcon(TabIcon.Partners),
tabBarOnPress: onTabPress,
},
},
I'm changing the language like this
import i18n from 'i18next';
// other code
i18n.changeLanguage(languageCode);