Xcode Localization Catalog (XCLOC) files are used for managing project localization in Xcode, starting with version 10. The XCLOC format is designed to provide additional contextual information for translators and supports a wide range of localization resources, such as .strings, .stringsdict, images, markdown, and others. Built on top of the XLIFF format, XCLOC still uses XLIFF for storing localized strings.
Technical information
Overview
Format name:
Xcode Localization Catalog (XCLOC)
File extensions:
.xcloc
Common use cases:
Managing and organizing localization resources in Xcode projects, providing additional context for translators.
Technical details:
Structure: XCLOC files are directories that store localization resources in the Localized Contents directory. These resources can include text files, images, and other localization assets. The localized strings are stored in XLIFF format within the catalog.
โEncoding: UTF-8
Generating
To generate an XCLOC file:
Select your project in Xcode.
Run the
Editor -> Export for localization...
action.
Importing
To import a newly exported localization:
Open your Localized Contents directory inside your Localization Catalog (XCLOC).
Select the generated XLIFF file.
Exporting
When exporting the translation from Lokalise, select the Apple XLIFF (.xliff) format. You can then import the generated XLIFF files into the Xcode project the same way you would import a Localization Catalog.
Using with Lokalise
Lokalise supports the Xcode Localization Catalog format, allowing you to manage and translate your localization resources efficiently.
Supported project types
Please note that XLOC files can be uploaded only to Web and mobile projects.
Known issues and limitations
Lokalise currently offers support only for text resources exported as XLIFF files.
Additional reading
Apple XLIFF (.xliff) support details
Internalization resources by Apple
New Localization Workflows in Xcode 10 from WWDC 2018