-
|
Hey 👋 I have followed the instructions. I've collected strings, prepared them, translated them into German. But the strings in my app are still shown in English. In the docs we have the app setup section: https://github.com/nkzw-tech/fbtee/?tab=readme-ov-file#app-setup I've done the same: I'm wrapping my whole _layout.tsx in the LocaleContext. Nothing. All I see in terminal is: which corresponds to the output of this runtime test my src/translations/de_DE.json looks like this right now: I'm looking for the text "Weiter", but it is sadly "Next" :) I went a step further. I created a button to set a locale: nothing. What I found out works is to provide a translations object with the loaded txs at runtime. Why is this necessary? I thought that the whole purpose of the loadLocale was to dynamically load the tx when necessary, yet it is never triggered?(even when I manually call setLocale 🤷 ) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
The Just double checking, are you loading your compiled translations, or the input translations that were created by If you are setting the locale to We prefer leaving it up to the developer so they can avoid flashing the app in the default locale and then the translated locale, or parallelize loading of locales to speed up initial app load. However, I recognize this can be confusing so we might change the behavior in the future so that |
Beta Was this translation helpful? Give feedback.
The
expo-app-templatecomes with working locale switch functionality, see https://github.com/nkzw-tech/expo-app-template/blob/main/src/app/_layout.tsxJust double checking, are you loading your compiled translations, or the input translations that were created by
prepare-translations? In the app, you need to load the former, not the latter. Just mentioning it because you do../../translations/de_DE.json, so maybe you are going one folder too far?If you are setting the locale to
de_DEon load and it is not the default locale, then it is expected that you will manually load it.loadLocaleis not called for the initial locale. Please see #35 (comment) for the explanation.We prefer leaving …