Localization
LaunchSwift uses String(localized:)/localized Text with Xcode String Catalogs.
ios/SwiftLaunch/Core/Localization/LocalizationManager.swiftios/SwiftLaunch/App/LaunchSwiftApp.swiftios/SwiftLaunch/Resources/Localizable.xcstrings
AppLanguage enum
Section titled “AppLanguage enum”Defined in LocalizationManager.swift:
enum AppLanguage: String, CaseIterable, Codable, Sendable { case en case es case fr case de case pt case ja}LocalizationManager API
Section titled “LocalizationManager API”struct LocalizationManager: Sendable { var preferredLanguage: AppLanguage func currentLocale() -> Locale}Implementation details:
preferredLanguageis persisted inUserDefaults(preferredLanguagekey)- default language is
.en currentLocale()returnsLocale(identifier: preferredLanguage.rawValue)
App root locale injection
Section titled “App root locale injection”LaunchSwiftApp injects locale like this:
.environment(\.locale, localizationManager.currentLocale())Current behavior notes
Section titled “Current behavior notes”LocalizationManageris a struct (not an@Observableclass).- There is no dedicated language picker screen in the current
SettingsView. - The localization foundation is present (language enum + persisted preference + locale injection), while in-app language switching UI is not yet implemented.
Supported languages in source
Section titled “Supported languages in source”Current language codes in AppLanguage and the shipped string catalog:
enesfrdeptja
Adding a language
Section titled “Adding a language”- Add a new case to
AppLanguageinLocalizationManager.swift - Add translations in
ios/SwiftLaunch/Resources/Localizable.xcstrings - Ensure your app flow updates
preferredLanguagewhere you expose language selection UI