Skip to content

Instantly share code, notes, and snippets.

@devahmedshendy
Created January 27, 2026 12:35
Show Gist options
  • Select an option

  • Save devahmedshendy/a73187de4b5dafe69b5f82342c1f1fcb to your computer and use it in GitHub Desktop.

Select an option

Save devahmedshendy/a73187de4b5dafe69b5f82342c1f1fcb to your computer and use it in GitHub Desktop.

Description

A quick utility to remove a specific language from Apple's String Catalog (.xcstrings) files using jq.

Credit: This solution was provided by Jayson Rhynas, Co-founder of medlylabs.com.


The Problem

Currently, Xcode's String Catalog editor doesn't provide a global "Delete Language" option. Manually deleting a language from every single key is tedious for large projects.


The Solution: jq

If you have jq installed (via brew install jq), you can strip a language from the JSON structure of the .xcstrings file directly.

One-Liner (Standard)

Replace fr with the language code you want to remove (e.g., de, es, zh-Hans).

# 1. Back up your file
cp Localizable.xcstrings Localizable.xcstrings.bak

# 2. Filter out the unwanted language and overwrite
jq '.strings |= map_values(del(.localizations."fr"))' Localizable.xcstrings.bak > Localizable.xcstrings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment