I am using the <repo_root>/Localizable.xcstrings string catalog in my XCode iOS project. I gather getting Crowdin to process and update that single file containing all translations is not available in the Free tier?
I find that the only way I can make this work is to generate a new file in say <repo_root>/es/Localizable.xcstrings and then copy that back over the <repo_root>/Localizable.xcstrings where Xcode will use it.
Hi @divvytrip ![]()
The good news is that this isnât a Free tier limitation - the .xcstrings format is fully supported. The issue seems to be related to how your export configuration is set up.
To help you fix the configuration thatâs forcing you to copy files manually, could you please confirm and share the following:
⢠Are you using the Crowdin CLI or a GitHub/GitLab integration?
⢠Please share the configuration block for your Localizable.xcstrings file - both the source path and the translation path.
Once we have this info, weâll be able to check whatâs going on!
Hi,
I apologize for the formatting, but the message editor does not seem to have an option to format as âplain textâ - so extra lines.
I tried making source and translation âthe sameâ but I hit this error.
STARTING CROWDIN ACTION
UPLOAD SOURCES
Configuration file is invalid. Check the following parameters in your configuration file:
- The âtranslationâ parameter should contain at least one language placeholder (e.g. %locale%)
project_id_env: CROWDIN_PROJECT_ID
api_token_env: CROWDIN_TOKEN
files:
- source: Localizable.xcstrings
translation: Localizable.xcstrings
multilingual: true
This is my current crowdin.yml configuration. Which works.
I use a python script to merge the translated file into the <repo_root>/Localizable.xcstrings
project_id_env: CROWDIN_PROJECT_ID
api_token_env: CROWDIN_TOKEN
files:
- source: Localizable.xcstrings
translation: %locale%/Localizable.xcstrings
skip_untranslated_strings: true
To add more information, I am using GitHub integration with an Action that runs on Push.
Hi there! Just checked the project and can see that you have only one target language. Do you have issues with exporting it? or the issue is that you want to keep
translation: Localizable.xcstrings
As the export pattern, but the system wonât let you?
To directly answer your question, yes I wanted to keep
translation: Localizable.xcstrings
as the export pattern - even if I use multiple languages.
However, when I do that, I get the error
âThe âtranslationâ parameter should contain at least one language placeholder (e.g. %locale%)â
So it seems Crowdin does not like source==translation
Crowdin would need to intelligently process the (JSON) file and insert/replace multiple translations rather than simply read that file and generate separate <language_code>/Localizable.xcstrings.
As an aside, Xcode however does that. When you build , Xcode will insert new âenâ language strings it finds but leaves any existing translations alone. Xcode alerts you to situations where âenâ strings are no longer present in the source code and offers the option to delete them and their translations from the Localizable.xcstrings
Hi ,
I am doing one translation at the moment.
Maybe I need to clarify. The file Xcode project file âLocalizable.xcstringsâ contains translations for ALL languages in a single file. Thatâs why it is both the âsourceâ and the âtranslationâ. But that doesnât seem to work with CrowdIn which wants to generate a separate file with the translation for each language - or so it seems.
Andrew
Hi @divvytrip ,
Sorry for the confusion! Crowdin does support multilingual files ![]()
Just try replacing multilingual: true with multilingual: 1 in your configuration file, and donât forget to add a slash at the beginning of the translation path. Your config should look like this:
files:
- source: Localizable.xcstrings
translation: /Localizable.xcstrings
multilingual: 1
Thanks for your response. That is very helpful to know, if not that obvious ![]()