It is not clear to me how I can share translations between 2 platforms (iOS & Android).
For example:
I have 2 different projects in two different repos (one iOS and one Android)
on iOS, I have an .xcsrtrings translation file;
on Android, I have an XML file for each language;
Expectation:
to be able to upload these files from different platforms on the Crowdin platform. I already managed to do this by using Crowdin CLI;
to be able to see combined translations in the web interface. This is checked, I am able to see both platforms’ translations;
be able to download for each platform the combine translation. For example if I added a translation on iOS and push it, then I pull on Android I would like to see this added translations as well. I have no idea how can I achieve this, or what are the best practices.
Can you give me some ideas how to properly share translations between iOS and android platforms, if possible to respect the expectations?
To share translations between iOS and Android, combine both .strings and .xml files into a single Crowdin project, then enable Unify Placeholders and Hide Duplicates so shared strings are translated once and apply to both platforms. You can also configure Bundles for exporting platform-specific files (iOS and Android formats) from the same translation base. These best practices are outlined here:
Hello, thank for the quick response. I had tried the proposed suggestions to enable Unify Placeholders and Hide Duplicates (I had already been using the same project for both platforms).
But I had notice the next behaviors that I was not expected:
If a translation key do not exist in both projects (iOS and android) it will not be shared. I would like a mechanism, that when I add a key on iOS and push it to the crowding project, translate it there, then at pull on android to pull this new key;
If a key is present on both platforms, it appears twice in the web interface. This is a potential issue for translators.
Related to point 2, when a key is showing up twice in the web interface. If change the translation value for the first key, it is updated the second as well (expected behavior). But, if I change the value for the second key, the first one is not updated, then this duplication connection is broken.
I am not allowed to return to a previous translation. More exactly, I do a translation, I save it, then at some point I edit it so something else, save it again. Then if I try to edit it once more to the initial text, I am not allowed to. I get this error: An identical translation of this string has been already saved.
This is correct. “Hide Duplicates” feature specifically works by identifying identical source strings (and potentially keys, depending on settings) that are present in multiple uploaded source files within the same project. If a string (and its key, if strict mode is used) exists only in your iOS file and not in any Android file, Crowdin doesn’t consider it a “duplicate”, it’s just an original IOS string. You can’t pull an iOS-specific key to Android (or vice-versa) unless you’ve explicitly told Crowdin to create a new string in the target platform’s file during export, or if that string eventually gets added to the Android source files. Crowdin primarily translates content from your source files and exports to their respective formats. It doesn’t automatically “merge” or “create” new keys in a target platform’s file if they don’t exist in that platform’s original source file.
This indicates a setting mismatch. When “Hide (regular detection)” (or “strict”) for duplicate strings is correctly applied, identical strings should indeed appear only once in the editor for translators. If they’re appearing twice, it suggests that Crowdin isn’t identifying them as duplicates for some reason (different context/labels, for example). More about duplicate settings can be found here: Import Settings | Crowdin Docs
That’s also the default behaviour of the master-duplicate connection. All string-related changes should be applied to the master string if you want to see them reflected in duplicates as well. If the changes are applied to the duplicates, this connection will be indeed broken, as the duplicated string become the “new master”.