Apple Strings Catalog Free
ByAwesome CrowdinVerified Author

All Apple SDK localization format

Try Crowdin

Apple Strings Catalog translation with Crowdin

Copy link

Apple Strings Catalog is a natively supported file format, you can use it without an additional installation. Just upload it to your projects and start the localization.

File Format Details

Copy link
Attribute Value
File Extension .xcstrings
API Type string_catalog
Source can be edited in Crowdin No
Generating translated files via Bundles Search Crowdin Store
Supports pluralization Yes
WYSIWYG Preview in the editor No
Supported types of contextual information Text comments, Screenshots, Live preview via SDK
Custom attributes No
Existing translations import possibility Key-value mapping

Sample File

Copy link
{
    "sourceLanguage": "en",
    "strings": {
        "%lld points": {
            "comment": "Points string",
            "extractionState": "manual",
            "localizations": {
                "en": {
                    "variations": {
                        "plural": {
                            "one": {
                                "stringUnit": {
                                    "state": "translated",
                                    "value": "%lld point"
                                }
                            },
                            "other": {
                                "stringUnit": {
                                    "state": "needs_review",
                                    "value": "%lld points"
                                }
                            },
                            "zero": {
                                "stringUnit": {
                                    "state": "translated",
                                    "value": "Zero points"
                                }
                            }
                        }
                    }
                },
                "fr": {
                    "variations": {
                        "plural": {
                            "one": {
                                "stringUnit": {
                                    "state": "translated",
                                    "value": "%lld point"
                                }
                            },
                            "other": {
                                "stringUnit": {
                                    "state": "translated",
                                    "value": "%lld points"
                                }
                            },
                            "zero": {
                                "stringUnit": {
                                    "state": "translated",
                                    "value": "Zéro point"
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "version": "1.0"
}

Translating Apple Strings Catalog

Copy link

Plural Forms

In some cases, your source files may contain source strings with the Zero plural form, even if your Crowdin project's source language does not support the Zero plural form (e.g., English supports only the One and Other plural forms).

When importing such files to Crowdin, the Zero plural form will be imported as a separate string, while the rest of the plural forms will be combined into a single plural string.

When exporting translations for target languages that natively support the Zero plural form, this separately imported Zero plural form string will be ignored and not exported. To prevent duplication, Crowdin will export only the Zero plural form created by Crowdin.

When exporting translations for target languages that do not natively support the Zero plural form, this separately imported Zero plural form string will be exported in the translation file.

Read more about Translating Strings with Plural Forms.

Note: Crowdin follows the CLDR Language Plural Rules when working with plural forms. Including the Zero plural form in source files is only recommended if your Crowdin project's source language supports it natively.

Exporting Translations for Primary and Dialect Languages

In Crowdin, some languages are considered primary (e.g., English, French, Spanish, etc.), while others are considered dialect languages (e.g., English, Canada; French, Canada; Spanish, Latin America, etc.), which are based on the primary languages. Depending on your Crowdin project's target language list, the language codes used in the exported translation files may be applied in the following way:

  • If your Crowdin project contains only primary languages with no dialect languages, on export, Crowdin will apply two_letters_code language codes to all project's target languages.

  • If your Crowdin project contains both primary languages and dialect languages that share the same two_letters_code language code, in this case, on export, Crowdin will apply locale language code to dialect languages.

  • If your Crowdin project contains two primary languages that share the same two_letters_code language code, like in the previous case, on export, Crowdin will apply locale language code to these languages.

Setting up Language Mapping and Creating Custom Languages

There might be cases when the language codes for particular languages differ in Crowdin from the ones you use in Xcode. To ensure that exported translations from Crowdin will be successfully imported into Xcode, we recommend setting up Language Mapping or creating Custom Languages.

See the examples below:

  • In Xcode, you have Chinese, Chinese Simplified, and Chinese Traditional. Since there is no Chinese among the supported Crowdin languages, in this case, you can add Chinese Simplified and Chinese Traditional to your Crowdin project and create an additional custom language for Chinese, which you can then also add as one of the target languages.

  • In Xcode, you have Chinese and Chinese Traditional. In this case, you can add Chinese Simplified and Chinese Traditional to your Crowdin project and use the language mapping to change the language code for Chinese to the same one you use in Xcode.

Crowdin is a platform that helps you manage and translate content into different languages. Integrate Crowdin with your repo, CMS, or other systems. Source content is always up to date for your translators, and translated content is returned automatically.

Learn More
Categories
File Formats
Works with
  • Crowdin Enterprise
  • crowdin.com
Details

Released on Sep 28, 2023

Updated on Feb 23, 2024

Published by Awesome Crowdin

Identifier:string_catalog