Localization

RSS for tag

Localization is the process of adapting and translating your app to multiple languages.

Posts under Localization tag

102 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Siri misreads local currency in notifications (Bug reported, still unresolved)
I’m experiencing an issue where Siri incorrectly announces currency values in notifications. Instead of reading the local currency correctly, it always reads amounts as US dollars. Issue details: My iPhone is set to Region: Chile and Language: Spanish (Chile). In Chile, the currency symbol $ represents Chilean Pesos (CLP), not US dollars. A notification with the text: let content = UNMutableNotificationContent() content.body = "¡Has recibido un pago por $5.000!" is read aloud by Siri as: ”¡Has recibido un pago por 5.000 dólares!” (English: “You have received a payment of five thousand dollars!”) instead of the correct: ”¡Has recibido un pago por 5.000 pesos!” (English: “You have received a payment of five thousand pesos!”) Another developer already reported the same issue back in 2023, and it remains unresolved: https://developer.apple.com/forums/thread/723177 This incorrect behavior is not limited to iOS notifications; it also occurs in other Apple services: watchOS, iPadOS, and macOS (Siri misreads currency values in various system interactions). Siri’s currency conversion feature misinterprets $ as USD even when the device is set to a region where $ represents a different currency. Announce Notifications on AirPods also exhibits this issue, making it confusing when Siri announces transaction amounts incorrectly. Apple Intelligence interactions are also affected—for example, asking Siri to “read my latest emails” when one of them contains a monetary value results in Siri misreading the currency. I have submitted a bug report via Feedback Assistant, and the Feedback ID is FB16561348. This issue significantly impacts accessibility and localization for users in regions where the currency symbol $ is not associated with US dollars. Has anyone found a workaround, or is there any update from Apple on this?
0
1
51
3h
xcstringstool not producing all localisations
Hi iOS peeps ! Was just wondering if anyone has had this issue before with String Catalogs. I have an iOS project where I am using String Catalogs for localisation ( the project is split up into multiple local swift packages with each project having its own Localizable.xcstrings ) and the app currently only supports en as the base and en-US for US localisation During the build process however some of the swift packages only produce the en-US localisation and is missing the en default localisation in the binary. Having a look at the build log for some xcstringstool will only produce one set of Localizable.strings (en-US.lproj) instead of (en.lproj and en-US.proj) I haven't been able to find much documentation from Apple on xcstringstool as well / not sure where to find more info about this
2
0
187
6d
Inconsistency Between Translation API Language Identifiers and Foundation Locale
I recently noticed an inconsistency in how languages are represented in Apple’s new Translation API compared to Foundation’s Locale system. Observation from the Translation API When retrieving the list of supported languages using: let availableLanguages = try await LanguageAvailability().supportedLanguages The results are: Language(components: Foundation.Locale.Language.Components(languageCode: Optional(uk), script: nil, region: Optional(UA))) Language(components: Foundation.Locale.Language.Components(languageCode: Optional(zh), script: nil, region: Optional(TW))) Language(components: Foundation.Locale.Language.Components(languageCode: Optional(ko), script: nil, region: Optional(KR))) Language(components: Foundation.Locale.Language.Components(languageCode: Optional(en), script: nil, region: Optional(GB))) Language(components: Foundation.Locale.Language.Components(languageCode: Optional(de), script: nil, region: Optional(DE))) Language(components: Foundation.Locale.Language.Components(languageCode: Optional(zh), script: nil, region: Optional(CN))) Language(components: Foundation.Locale.Language.Components(languageCode: Optional(ja), script: nil, region: Optional(JP))) Language(components: Foundation.Locale.Language.Components(languageCode: Optional(id), script: nil, region: Optional(ID))) Language(components: Foundation.Locale.Language.Components(languageCode: Optional(nl), script: nil, region: Optional(NL))) .... Key points: • The script component is always nil. • Region codes (CN, TW, etc.) determine the script for languages like Chinese (Simplified or Traditional). • Other languages (e.g., en-GB, en-US, pt-BR) also rely on region-based identification. Observation from Foundation Locale (Locale.current.language) When retrieving the user’s system language setting: systemLanguageObj = Locale.current.language I get a different format where the script component is present, but the region may vary based on user settings. This means that mapping between script and region is not consistent between the two APIs, requiring manual handling. My key questions: 1. Is my current approach correct, or is there a better way to get user language settings that match Translation API identifiers? 2. If no alternative exists, could the Translation API align its language identification method with Foundation Locale to reduce ambiguity? Any insights or suggestions would be greatly appreciated!
1
0
140
2w
Swift Playgrounds on iPad localization
Hey, meanwhile it's a great thing to program apps on the iPad and to be able to load them into the App Store Connect and the App Store. What about localization in the meantime? When I open the folder en.lproj in sample apps from XCode, then there are two files stored in it: Glossary.plist (XML) and Localizable.strings (binary) Is it correct that XCode creates binary files from the strings? Otherwise, Swift Playgrounds already offers localization in the localized learning content, but i guess the binary files can only be created in XCode?
2
1
205
2w
Local Authentication & localized reason string
In a project I was using Local Authentication to authenticate a user. When I got a request to support smartcard/PIV token authentication (which Local Authentication does not support), I had to switch to Authorization Services, which works pretty. There's only one issue I have. Local Authentication's evaluatePolicy:localizedReason:reply: requires a reason in the form "<appname>" is trying to <localized reason>. The app is currently translated into 41 languages and I would like to use the localized strings for the AuthorizationEnvironment of Authorization Services as well. The problem is that Local Authentication prefixes the localized string with something like "<appname>" is trying to and Authorization Services does not do this. Is there a way to get this prefix from somewhere so I can manually add it to the (partially) localized string? Any help would be highly appreciated. Thank you, Marc
7
0
361
2w
Leaderboard localization
Hello, I setup a leaderboard in the default language English and everything works and the app is live in the store. Now I am adding localization to the leaderboard and noticed than some languages have the data entry "Score Format Suffix" and some languages the data entries "Score Format Suffix (Singular)" and "Score Format Suffix (Plural)" instead. Is this an error or intentional? Kind Regards, Chris
2
0
414
3w
How to get the real app language code + variation?
Hello, I have the app localised to many languages and its variants, like English from Australia or Dutch from Belgium. My phone language is en_UK and the region is configured to ES. I cannot find a way to get the regional language code (ex: en_au, nl_be), it always gets simplified to the language (ex: en, nl), or adds my device region (ex: en-ES, nl-ES). Here I attach some examples while I have the app on en_au Locale.preferredLanguages ▿ 3 elements - 0 : "en-ES" - 1 : "ca-ES" - 2 : "es-ES" Bundle.main.preferredLocalizations ▿ 1 element - 0 : "en" NSLocale.current.languageCode ▿ Optional<String> - some : "en" Locale.current ▿ en_001@rg=eszzzz (fixed en_001@rg=eszzzz) - identifier : "en_001@rg=eszzzz" - locale : "fixed en_001@rg=eszzzz" Locale.autoupdatingCurrent.languageCode ▿ Optional<String> - some : "en" Locale.current.languageCode ▿ Optional<String> - some : "en" Locale.preferredLanguages[0] "en-ES"
2
0
410
Jan ’25
Use of WidgetConfigurationIntent WidgetKit configurable parameter unable to internationalization of the title?
struct DeployAndWithdrawDefensesAppIntent: WidgetConfigurationIntent { // An example configurable parameter. @Parameter(title:LocalizedStringResource("ax_alarm_device_name")) } In the process of using iOS widgetKit development team a, configuration item title need language internationalization (@ Parameter (title: LocalizedStringResource (" ax_alarm_device_name "))), but found no effect. I first changed the language of the system on the iphone and found that the widget worked. However, just changing the language of the app did not take effect. Is there any way to just change the app language and make the widgets change? Thank you very much!
1
0
490
Jan ’25
Unable to detect changes to language from Settings post a initial manual override
We have a requirement in the App in which for certain countries/regions we have to support only certain languages. If the User's current language is not supported, We would have a custom fallback/default language for specific regions. like it could be Arabic for middle east countries, English for Europe etc. Since iOS localization allows fallback to only one Base localizations, we had to take a custom approach to implement the same. To achieve the same, we checked the User's current language and Country and if required we overrode the "kLanguageBundleKey" property within the Bundle class, and set the following user defaults, (here for example say english) Foundation.UserDefaults.standard.set(["en"], forKey: "AppleLanguages") Foundation.UserDefaults.standard.synchronize(). And it works! The problem is that in iOS, post this override, when the user changes language from the Phone's settings app. Launches our app, Bundle.main.preferredLocalizations.first always gives what we overwrote and not the one present in the Phone's settings. Given this, Is there way to get the user's current language even after such overrides? or should we do the language overrides some other way?
1
0
385
Jan ’25
Incorrect support language displayed at App Store
Our app support English and Traditional Chinese only, so the Xcode config and the app store setting include these 2 languages only now. However, the support languages displayed at the App Store show our app support Simplified Chinese. Would like to know is there any config we missed or wrong setting we have done? Appreciate for any reply or suggestion.
5
0
619
3w
Reusing string catalog translations in swift packages
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?
1
0
282
Jan ’25
Accessibility Localization Questions
For practice, I have implemented accessibility labels and announcement in a very simple test app (All SwiftUI, all iOS 18). The app is not localized, default language is English. When running this on a German phone, odd things happen in the localization. My accessibility labels are read with an accent, but when they contain a url, the "dots" are read as the German "Punkt" (with an English Accent). When I am providing the same text as accessibility announcement, the same text (which is in English), is read with a German voice. I am also providing a Button with an "arrow.clockwise" image, and VoiceOver reads this, in an English Voice with "Refresh, Button". This is great and was to be expected. However, when the button is disabled, VoiceOver reads "Refresh, grau dargestellt, Button", all in an English Voice. Is this an error? Am I doing it wrong? The video at the link should show the issue https://share.icloud.com/photos/0757FJW2Q3fsA_cdhMX6ls46Q
2
0
784
Dec ’24
No localisation when I publish in TestFlight
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.
0
0
332
Nov ’24
Bundle.main.preferredLocalizations vs. Locale.preferredLanguages vs. "AppleLanguages"
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.
0
0
339
Dec ’24
How to Set Azerbaijani as Default Language for My App?
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!
1
0
356
Dec ’24