How to translate Swift Radio into any language

Starting with v3, all user-facing text in Swift Radio is managed through two files. You don't need to write any Swift code to change or translate it:

  • Localizable.xcstrings: a String Catalog that holds every visible string (titles, labels, descriptions, error messages)
  • Config.swift: app-wide settings like your contact email, website, and feedback URL

Changing the default English text

Open Localizable.xcstrings in Xcode. The String Catalog editor shows a table with a Key column and an English column. The keys are internal identifiers. The English column is where the actual text lives.

Xcode String Catalog editor showing the key and English value columns for Localizable.xcstrings

String Catalog editor with keys and English values

Use the filter bar at the bottom to search by keyword (e.g. stations, about, features).

Common strings to customize:

KeyDefault ValueDescription
stations.titleSwift RadioMain title at the top of the station list
about.titleAbout Swift RadioAbout screen title
about.headerTextSwift Radio is a fully featured...About screen description paragraph
about.shareTextCheck out Swift Radio!Text used when sharing the app
about.footerCopyrightSwift RadioCopyright name in the About footer
about.footerAuthorsFethi El Hassasna & Matt FecherAuthor names in the About footer
stationDetail.defaultDescriptionYou are listening to Swift Radio...Fallback text on the station detail screen

These are the most common ones. The full list is visible in the String Catalog editor.

Click any value in the English column to edit it. Changes take effect on the next build.

Do not rename the keys. They are referenced in Content.swift and renaming them will break the lookup.

Adding a new language

  1. Select the SwiftRadio project in the navigator (the blue project icon, not the folder).
  2. Go to the Info tab and find the Localizations section.
  3. Click + and pick a language (French, Spanish, Arabic, etc.). Xcode adds a new column to the String Catalog automatically.
Xcode language picker showing the list of available languages to add

Adding Arabic from the language picker

Back in Localizable.xcstrings, you'll now see the new language column next to English. Click each empty cell and type the translation.

Any string you leave untranslated falls back to English, so you can translate incrementally.

Xcode String Catalog editor showing English and Arabic columns with translated values

English and Arabic side by side in the String Catalog

Testing a specific language

Go to Edit Scheme > Run > Options and change App Language to the language you want to preview. Build and run. The app launches in that language without changing your device settings.

Swift Radio bottom sheet in English showing About Station, Station Website, Play in Music App, and Share Now Playing

English

Swift Radio bottom sheet in Arabic with RTL layout showing translated menu items

Arabic (RTL)

Customizing links and contact info

Open SwiftRadio/Config/Config.swift. Near the top you'll find:

static let website = "https://yourwebsite.com"
static let email = "hello@yourwebsite.com"
static let emailSubject = "From \(Bundle.main.appName) App"
static let feedbackURL = "https://yourwebsite.com/contact"
static let licenseURL = "https://raw.githubusercontent.com/..."

Replace the placeholder values with your own URLs and email address.

These are URLs and email addresses that stay the same across all languages, which is why they live in Config.swift rather than the String Catalog.


FileWhat to edit
Localizable.xcstringsAll user-facing text (titles, labels, descriptions)
Config.swiftContact email, website, feedback URL, license URL