Closed basine closed 4 years ago
Thank you for bringing this to our attention @basine.
We will check the behaviour and give feedback at short notice.
A question for better understanding: Is Swiss German (de-CH) also made available as language in the Xcode Project and assigned as translation in the OTA backend, too?
Yes, I added them for testing the behaviour
Sorry, this detail isn't really clear though: We have a "de" localization and a "de-CH" both on Phrase and in the app. There is no "de-DE" localization.
@basine No problem, thanks for the clarification! I'll try to reproduce this asap.
We have a similar problem at the moment: When setting only the language instead of language and region, we wonโt get the expected OTA translations, but Phrase is returning the translation from the fallback.
Example: Phrase project is configured with these languages:
de_DE
en_US
nl_NL
When changing the language on the phone (or simulator) but keeping the region, we often get combinations like
nl_DE
nl_US
In those cases Phrase returns the fallback (en_US
) instead of looking for a match with only the language code.
We would expect that asking the SDK for a translation with the nl_DE
locale would return the translations for nl_NL
. Is there any way we can achieve this without creating the duplication of languages in Phrase which @basine already mentioned?
@basine I was able to reproduce the mentioned behaviour with the locale setup given. We are going to release an update later this week. Thank you very much for reporting!
@ffittschen Your issue is likely different from what @basine describes. The fallback is handled in the Backend, so https://github.com/phrase/ios-sdk/issues/17 is probably what you need, too? @theSoenke
@winkelsdorf Indeed, sorry. I was reading both issues and replied to the wrong one. I'll move the comment over to #17 .
@ffittschen No problem, that's what I thought ๐
@basine Sorry for the delay. I would like to inform you that this and another problem have been successfully identified and resolved. An update will be released soon.
@basine Thank you for your patience. The release is now available ๐
We are trying to localise our app for the German and Swiss market and have noticed a behaviour that seems incorrect to us:
When the user has selected Germany as their country, but Swiss German as their preferred language in settings, we would expect the app to update the Swiss German de-CH translation. In reality it is trying to download the German translation de-DE.
This seems incorrect, since the user's preference is Swiss German, not German. I assume that you are using Locale.current instead of Bundle.main.preferredLanguages to figure out the users language preference?
We know we can override the locale that's being used, but were still wondering if this behaviour was intentional or rather a bug.