On iOS Bundle.main.preferredLocalizations returns the list of languages the application bundle supports in user-preferred order with the first element being the language the application is running in.
Additionally Locale.preferredLanguages returns the list of languages in the order they are presented in Preferences.app > General > Language & Region > Preferred Languages with the first element being the user's "primary language" (i.e. the language the system is running in).
However this only seems to be true unless the user has chosen a per-app language which is different from the primary language in which case Locale.preferredLanguages.first is equal to Bundle.main.preferredLocalizations.first - regardless of the latter's position in the Preferred Languages list.
Furthermore this seems to change depending on the value of the "AppleLanguages" key in the User Defaults' global domain (see c.f. https://stackoverflow.com/a/42648166).
Is this behaviour documented anywhere?
Addendum: I know that according to https://forums.developer.apple.com/forums/thread/718512?answerId=733680022#733680022
AppleLanguages is an implementation detail, not something that’s considered API.
Locale.preferredLanguages is API, though.
Localization
RSS for tagLocalization is the process of adapting and translating your app to multiple languages.
Posts under Localization tag
85 Posts
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hello, I need an help.
It's my first application and publishing.
I developed my application in 2 languages, English by default and French.
In the simulator or on 1 device via Xcode, everything works.
In Xcode everything seems good.
2 languages in project info and my App Target in Target membership
2 languages in Localizable.xcstrings and green
Localizable.xcstrings added in Target / Build Phase / Copy Bundle Resources
I also tried to add in my app.plist
CFBundleLocalizations
en
fr
In App Store Connected
both languages declared, also in Testflight.
But...nothing, when I install the application thought TestFlight, no language. The application showing the label coded in swift.
I found only one relevant post but not working for me.
What am I missing.
Thanks in advance for any help.
Topic:
App Store Distribution & Marketing
SubTopic:
TestFlight
Tags:
ResearchKit
TestFlight
Localization
Having the app localised and configured to Dutch from Belgium (nl_BE), I open a url with WKWebView. The website locale detects Dutch from Netherlands (nl_NL)
Hello, the LocalizedStringKey does not work in the live activity. What do you suggest me to use in order to get localization in the live activity?
In order to make referencing keys for localized strings a little more reliable, our application references generated constants for localized string keys:
This eliminates the potential for developers to misspell a key when referencing a localized strings. And because these constants are automatically generated by the exact same process that provides localized strings for the application, each and every constant is guaranteed to have a localized string associated with it.
I’m currently attempting to implement something similar for the localized strings referenced by our new App Intents. Our initial release of App Intent functionality is simply using string literals to reference localized strings:
However, I am running into several issues when trying to reference the string keys as a constant. The closest I managed to get was defining the constant as either a LocalizationValue or as a StaticString and referencing the constant while initializing the LocalizedStringResource. With this approach, I see no errors from Xcode until I try and compile. What’s more is that the wording of the error being thrown is quite peculiar:
As you can see with the sample code above, I am clearly calling LocalizedStringResource’s initializer directly as Indicated by the error.
Is what I’m trying to do even possible with App Intents? From my research, it does look like iOS app localization is moving more towards using string literals for localized strings. Like with String Catalog’s ability to automatically generate entries from strings referenced in UI without the need for a key. However, we’d prefer to use constants if possible for the reasons listed above.
I reported Korean IME bug to QT Bug report. Please refer to below link.
https://bugreports.qt.io/browse/QTBUG-136128?jql=text%20~%20korean%20ORDER%20BY%20created%20DESC
But, QT reponsed me like follwing.
Thank you for reporting. However, this issue seems like a known issue with apple's Korean IME. There are many threads in Korean community about the same problem with Non-Qt apps. If this issue is a really Qt issue, feel free to open it again.
Is there any workaround to fix this IME bug ?
Thanks,
Ted
Hello!
The localization isn't working when using SubscriptionStoreView. The app hasn't been published yet. The subscription has been created and localization strings have been added. Status - ready to submit.
Testing environment: Sandbox
When calling SubscriptionStoreView, the debug console shows this error:
GenerativeModelsAvailability.Parameters: Initialized with invalid language code: ru-RU. Expected to receive two-letter ISO 639 code. e.g. 'zh' or 'en'. Falling back to: ru
Despite this, the subscription interface appears in English when Russian is expected.
I don't use any locale setting for ru-RU anywhere in my code. The test device's region is set to Russia, and the language is Russian.
Any help would be appreciated.
We’re looking to localize our App Store listing with different metadata (app name, description, etc.) for India and the UAE, both in English.
In Xcode, we’ve already added .lproj folders for en-IN (English - India) and en-AE (English - UAE), and confirmed that the localized content is present in the bundle. However, when uploading to App Store Connect, we do not see English (India) or English (UAE) as available storefront metadata options.
This is a problem because our current English (UK) metadata is UAE-specific (includes VAT, TRN, etc.), but users in India are seeing that same listing, even though it doesn’t apply to them (India uses GST, e-way bill, etc.).
Our questions:
1. Are region-specific English variants like en-IN or en-AE supported for App Store metadata localization?
2. If not, is there an alternative way to offer different storefront experiences (e.g., name, description) for India and UAE?
3. Can this be achieved via custom store territories or another mechanism?
Our goal is to tailor the App Store listing specifically for users in India and UAE, both in English.
I am an SDK provider working with Swift Package Manager (SPM) to deliver libraries for iOS developers. My SDK currently uses SPM targets to modularize functionality. However, SPM enforces strict resource bundling, which prevents me from efficiently offering multiple targets—each with a different set of localization files—in a single package.
Current Limitation:
When multiple SPM targets share the same source and resource directory but require distinct sets of .lproj localization folders (for app size or client requirements), SPM raises “overlapping sources” errors. The only workaround is to manually split resource directories or have clients prune localizations post-build, which is inefficient and error-prone.
Feature Request:
Please consider adding native support in Swift Package Manager for:
Defining multiple targets within a single package that can process overlapping source/resource directories,
Each target specifying a distinct subset of localization resource files via the exclude or a new designated parameter,
Enabling efficient modular delivery of SDKs to clients needing different localization payloads, without redundant resource duplication or error-prone manual pruning.
Support for this feature would greatly ease SDK distribution, lower app sizes, and improve package maintainability for iOS and all Swift platforms.
I have some question about the TTS
My device default language is zh-HK. (cantonese)
my device is iPhone 16 Pro, IOS 18.6
I create a function speakMandarin
I want the device to speak the zh-CN (putonghua)
however the device only can speak zh-HK (cantonese).
I already set the AVSpeechSynthesisVoice language as zh-CN
func speakMandarin(text: String) {
print("speakMandarin, \(text)")
lastError = nil // Reset error
// Stop any ongoing speech before starting new
if synthesizer.isSpeaking {
synthesizer.stopSpeaking(at: .immediate)
}
// Configure speech utterance
let utterance = AVSpeechUtterance(ssmlRepresentation: text)!
utterance.rate = 0.5 // Natural speaking speed
utterance.pitchMultiplier = 1.0
utterance.volume = 1.0
utterance.voice = AVSpeechSynthesisVoice(language: "zh-CN")
let preferredLanguages = [ "zh-CN" , "zh-TW"]
var selectedVoice: AVSpeechSynthesisVoice?
for lang in preferredLanguages {
if let voice = AVSpeechSynthesisVoice(language: lang) {
print(lang)
selectedVoice = voice
utterance.voice = voice
break
}
}
// If no Mandarin voice found, use system default
if selectedVoice == nil {
selectedVoice = AVSpeechSynthesisVoice(language: nil)
lastError = "未偵測到普通話語音包,將使用系統預設語音"
print (lastError)
}
utterance.voice = selectedVoice
print(utterance)
synthesizer.speak(utterance)
}
here is my log
speakMandarin, <speak>你好!我們來聊聊喜歡的動物吧。你喜歡什麼動物呢?</speak>
zh-CN
[AVSpeechUtterance 0x1194efb80] String: 你好!我們來聊聊喜歡的動物吧。你喜歡什麼動物呢?
Voice: [AVSpeechSynthesisVoice 0x104ceff90] Language: zh-CN, Name: Tingting, Quality: Default [com.apple.voice.compact.zh-CN.Tingting]
Rate: 0.50
Volume: 1.00
Pitch Multiplier: 1.00
Delays: Pre: 0.00(s) Post: 0.00(s)
Hi everyone 👋
I’m building an iOS app in Swift where I want to do the following:
Record the user’s voice
Transcribe the spoken sentence (speech-to-text)
Auto-detect the spoken language
Translate it to another language selected by the user (e.g., English → Spanish or Hindi → English)
Speak back (text-to-speech) the translated text on the same device
Is this possible to record via phone mic and play the transcribe voice into headphone's audio?
I've mentioned this before but I don't think it's getting seen by a department that can deal with it. I think it may be a Connect issue.
I have localizations in multiple languages.
They are all created the same way. In that the images are the same as the default language. I tried to rely on icons rather than text wherever possible to keep language from being a limiting factor.
Since releasing the app, I've tried a few ways to advertise it. One being ASA (Apple Search Ads) Basic. It accepts all my localizations except for Brazil. Even accepts Portugal.
When I email ASA tech support, I get generic sounding replies that are some variation of "add localization for Brazil and then the ads will start running". They do seem to acknowledge the text localization is there but seem to believe the images are not. This despite sending a screen cap. They do not attempt to explain why Brazil needs special treatment from all other localizations or why this isn't indicated in App Store Connect. I assume they are saying that despite the images already being there, I need to copy them to the Brazil localization anyway for some unknown reason.
This article indicates Brazil is a new addition to ASA for this year. This makes me suspect it may have a glitch.
I intended to only advertise in a few markets to start. Which didn't include Brazil initially. But ASA Basic isn't spending at all. On second attempt, it did net five downloads the first day and then hasn't had once since. This made me suspect one glitch may be causing another. Or maybe it is unrelated and advertising costs are just insane. Still, I think it's a possible glitch worth investigating.
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect
Tags:
App Store Connect
Localization
Hi everybody,
My team and I are currently working on an app that requires us to use localizations for the CFBundleDisplayName property in info.plist. However we are running into some issues ourselves, we need to localise the CFBundleDisplayName property for two specific countries:
Netherlands
Belgium
We've tried to use the String catalog and we've added the corresponding languages/regions there:
nl-BE (CFBundleDisplayName = x)
nl-NL (CFBundleDisplayName = y)
However the nl-BE localization does not seem to be used when changing the device language to Dutch (Belgium). It uses the nl-NL (y) value for the CFBundleDisplayName.
Is it possible to use CFBundleDisplayName localizations for specific regions that use the same language? such as Belgium and the Netherlands. If not I fear that we need to build two apps...
I have a Localizable file under Assets.
I can add a language by click the + button.
But I can't remove it then??!!
Remove a localization in project -> info does not work. If the localization contains some translation, it still remains in the catalog (works if not translated at all). As a result, your app will not show the default localization at all.
只能在string catalog里面添加语言,不能删除语言??这是什么设计?
在Project里面删除语言,并不能删除Localizable中的语言。但是如果这个语言没有任何国际化,是可以的。
也就是说,删不了曾经做过国际化的语言。
我应用还没发布,还在开发呢,为什么不让我删除语言??????????????????????????、
My app does not automatically switch languages (voices) in VoiceOver when I have VoiceOver on and the screen includes both English and Spanish content. Instead of switching between the correctly accented voice, whatever my manual Voices rotor setting is, that's what the content is announced as. I can manually switch the Voice in the rotor to make words sound inteligible but my main concern is that language changes are not auto-detected even though that feature in my Settings is on.
VO does detect language changes in other apps, so I think there must be either misplaced or missing accessibiiltyLanguage strings somewhere in my app. Or is it more than that for localization considerations?
I reached out to the Apple Accessibilty team and was directed to open a ticket here, as my question is about the underlying code.
I am a novice developer and primarily accessibility SME; i expect that wnen "detect languages" is on in the user settings for VoiceOver, that the voice for the screen reader speech output will automatically switch to the correct language / accent. I recognize there is a problem but am not sure where the breakdown is. I would like guidance how to fix it to relay to my teams.
https://developer.apple.com/documentation/objectivec/nsobject/1615192-accessibilitylanguage
Topic:
Accessibility & Inclusion
SubTopic:
General
Tags:
Swift
Accessibility
Localization
Internationalization
Hi!
When my device is set to English, both search and the Shortcuts up automatically show multiple shortcuts parametrised for each value of the AppEnum - which is what I expected. When my device is set to German, I get only the basic AppShortcut without the (optional) parameter.
I am using an AppEnum (see below) for the parametrised phrases and localise the phrases into German with an AppShortcuts String Catalog added to my project.
Everything else seems to work, I can use my AppShortcut in the Shortcuts app and invoke it via Siri in both English and German.
The Shortcuts app displays the values correctly using the localized strings.
Any ideas?
import AppIntents
class ApolloShortcuts: AppShortcutsProvider {
static var appShortcuts: [AppShortcut] {
AppShortcut(
intent: GetIntent(),
phrases: [
"Get data from \(.applicationName)",
"Get data from \(.applicationName) for \(\.$day)",
"Get data from \(.applicationName) for the \(\.$day)"
],
shortTitle: "Get Data",
systemImageName: "wand.and.sparkles")
}
}
enum ForecastDays: String, AppEnum {
static var typeDisplayRepresentation: TypeDisplayRepresentation = "Day"
static var caseDisplayRepresentations: [Self : DisplayRepresentation] = [
.today: DisplayRepresentation(title: LocalizedStringResource("today", table: "Days")),
.tomorrow: DisplayRepresentation(title: LocalizedStringResource("tomorrow", table: "Days")),
.dayAfterTomorrow: DisplayRepresentation(title: LocalizedStringResource("dayAfterTomorrow", table: "Days"))
]
case today
case tomorrow
case dayAfterTomorrow
var displayName: String {
String(localized: .init(rawValue), table: "Days")
}
}
Hi everyone,
I’m facing an issue with setting Azerbaijani as the default language for my app. The app is designed specifically for the Azerbaijani market, where the primary language is Azerbaijani, although Russian is also widely spoken.
During the submission process, I couldn’t find an option to set Azerbaijani as the default language. To move forward, I selected Russian, assuming I could change it later. However, I’ve hit a roadblock—I can’t figure out how to make Azerbaijani the default language now.
Has anyone else encountered this problem? Is there a workaround or solution to enable Azerbaijani as the default language?
I’d greatly appreciate any advice or guidance from the community.
Thanks in advance!
How can I guide users to set their preferred language in visionOS? At this point, the behavior seems to be different from that of iOS.
Setup
I have 2 swift packages and I try to use stirng catalog to manage your localizations
I would like to use some specific keys in these packages and some common ones (e.g. "ok_button_tittle")
Problem statement
I really don't like the idea of creating separate (but the same) translations in these packages
I have tried using something like
String(
localized: "ok_button_title",
table: "Localizable",
bundle: .main,
comment: "Ok button title"
)
This does use translations from the main bundle, however this does not automatically create the keys in string catalog
Question
Is there any possibility to reuse the translations from the main bundle?
Maybe there is a hack to make the keys appear automatically in the correct bundle? Or is it a bug?
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags:
Swift Packages
Swift
Asset Catalog
Localization