Open anurbecirovic opened 4 years ago
Thanks for pointing that out.
I think you're right, I didn't update the Highscore
component, and it still uses hardcoded text. You can see it here and there.
In order to fix it, you can apply the same approach described in the article.
Thanks for quick response, I have another question regarding the reload of the screen when language is changed. In my example I haven't used redux. Maybe that is something that is triggering components to re-render when data is changed in your case. But in my case I have TabNavigation with 3 screens, when I change language, title of tabs are changed but content inside the pages are not. I tried that on your component where there are no highscores
ListEmptyComponent={() => <Text style={{ textAlign: 'center' }}> {i18n.t('high_scores.title')} </Text> }
For some reason that is still not working :/
Thanks in advance.
When I faced the same issues, I figured out I need to use a Redux. Here is my article that describes that.
You can try to re-render components manually, but I suppose that solution will quickly become messy.
First of all, great explanation, but when implementing I had a same issue regarding TabNavigation. When we change the language, tab names are changing but content in middle screen (Highscores) is still on English (when switched to Germany). Any idea how to fix this ? Thanks