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

Setting an unsupported locale code doesn't fall back to a language code #182

Closed
chrispomeroyhale opened this issue Mar 18, 2022 · 1 comment
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@chrispomeroyhale
Copy link

Describe the bug
Currently, our server tells the clients which locale code to use. (We recognize this is backwards.) This means we call CrowdinSDK.currentLocalization to override the target language. The concern is that the Crowdin supported language codes doesn't list "Italian Italy" (it-IT) just Italy (it). Same story with fr-FR. Meanwhile, Apple's Locale.current.identifer will return it_IT and fr_FR. So there's some mismatching between locale codes between the Apple, our server, and Crowdin.

Over-the-air also doesn't appear to support falling back from it-IT to just it. Instead it fails to retrieve any language over-the-air at all. I spoke with our Android representative who said their SDK integration doesn't have this issue.

Furthermore, additionally, I can't add "it-IT" as a custom language (see screenshot).

To Reproduce
After the SDK initializes, set the CrowdinSDK.currentLocalization to a locale code that isn't officially supported by Crowdin. e.g. "it-IT". Ensure there is a localization for the language code e.g. just "it".

Actual behavior
No calls to retrieve over-the-air translations are made.

Expected behavior
I see two possible outcomes:

  1. Crowdin could provide "it-IT" as opposed to just "Italian" on the website?
  2. Crowdin SDK could handle either "it-IT" or "it"?

Screenshots
Screen Shot 2022-03-18 at 4 13 36 PM

Smartphone (please complete the following information):
Doesn't seem to matter? I am using an iPhone SE sim 15.2

Additional context

@chrispomeroyhale chrispomeroyhale added the bug Something isn't working label Mar 18, 2022
@DimaYashchyshyn-zz
Copy link

@chrispomeroyhale Greetings. We'll review your comment and update you on the matter after that.

@chrispomeroyhale chrispomeroyhale changed the title Setting the current locale code doesn't fall back Setting the current locale code doesn't fall back to a language code Mar 18, 2022
@chrispomeroyhale chrispomeroyhale changed the title Setting the current locale code doesn't fall back to a language code Setting an unsupported locale code doesn't fall back to a language code Mar 18, 2022
@andrii-bodnar andrii-bodnar added the help wanted Extra attention is needed label May 17, 2022
@andrii-bodnar andrii-bodnar added the hacktoberfest This issue welcomes contributions for Hacktoberfest label Sep 27, 2022
@andrii-bodnar andrii-bodnar removed the hacktoberfest This issue welcomes contributions for Hacktoberfest label Jun 15, 2023
@andrii-bodnar andrii-bodnar closed this as not planned Won't fix, can't repro, duplicate, stale Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants