This repository keeps track of all the languages that can be selected in Xcode for a project’s localizations. Since Apple doesn’t provide a public, up-to-date list of these languages, this repo serves as a reference for developers who want to know which languages are available in Xcode’s UI.
When you navigate in Xcode to:
Xcode > Project Navigator > Localizations
you can select from a list of supported languages for your project. This list is not documented anywhere publicly. This repository maintains that list in a structured format so it can be easily referenced or processed.
- The file
xcode-ui-languages-list.txtcontains all the language identifiers supported by Xcode. - The script
generate.swiftreads this list and outputs a formatted version:- By default, it outputs JSON (
all-languages-formatted.txt) containing each language’s display name and identifier. - You can also output plain text for easy reading using the
-tflag:
- By default, it outputs JSON (
swift generate.swift -tWhenever a new Xcode version is released, we have to manually add any new languages to xcode-ui-languages-list.txt and run the script again to update the formatted output.
xcode-ui-languages-list.txt– List of Xcode language identifiers (one per line).generate.swift– Swift script that reads the language list and generates a formatted output.all-languages-formatted.txt– Output generated bygenerate.swift(JSON or text).
Generate JSON output:
swift generate.swiftGenerate plain text output:
swift generate.swift -tThis repository is intended as a reference for developers looking to handle Xcode project localizations programmatically or for documentation purposes.