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
Localization
RSS for tagLocalization is the process of adapting and translating your app to multiple languages.
Posts under Localization tag
97 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
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,
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"
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!
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?
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.
NavigationTitle does not change when the app language changes. It works well in iOS 17.5 but does not in iOS 18.x
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?
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.
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
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.
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.
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!
Hi!
SiriTipView(intent:) shows the first phrase for my App Shortcut, but unlike ShortcutsLink(), does not use the localized applicationName. Hence the phrase shown does not work 😬
Is this a known limitation, any workarounds?
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")
}
}
I’m currently trying to localize one of my Mac apps for Right-to-Left languages.
In Xcode, to test this, I set the language to ‘Arabic’ in the scheme, which then displays the language and mirrors the layout accordingly.
I have two questions about this:
macOS titlebar buttons: In the title bar at the top, shouldn’t the Close and Minimize buttons also be on the right side (mirrored)? How can I test this?
Numerals: My UI still displays Latin numerals (123). I know this is correct in some Arabic-speaking regions, but I’d also like to test cases where Arabic-Indic numerals (١٢٣) are used. Is there a way to configure the scheme to test this?
What's the problem?
My app requests location access and for that I need to provide a description for the user to read so that it is clear why we need this permission. I'm using the latest solution suggested by XCode for my app localization which is using Localizable.xcstrings file. But for the permission description, I'm adding the text to Targets -> Info -> Custom iOS Target Properties -> "Privacy - Location Always and When In Use Usage Description". I understand that the default language is English in this list so I provided it, but now I want this description to be translated to other languages so that my users can read it in their preferred language.
What I have tried so far?
I tried adding translation to the keys "INFOPLIST_KEY_NSLocationAlwaysAndWhenInUseUsageDescription" and "NSLocationAlwaysAndWhenInUseUsageDescription" in my "Localizable.xcstrings" but it is always showing the description in English
Hello all.
This is my code snippet.
RecordListView()
.tabItem {
Label("Record List", systemImage: "list.clipboard")
}
.tag(Tab.RecordList)
When I export localizations, there is no Record List in the .xcloc file.
Then I use LocalizedStringKey for Label and export localizations file, the code is as follows:
let RecordsString:LocalizedStringKey = "Tab.Records"
RecordListView()
.tabItem {
Label(RecordsString, systemImage: "list.clipboard")
}
.tag(Tab.RecordList)
There is still no Tab.Records.
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
只能在string catalog里面添加语言,不能删除语言??这是什么设计?
在Project里面删除语言,并不能删除Localizable中的语言。但是如果这个语言没有任何国际化,是可以的。
也就是说,删不了曾经做过国际化的语言。
我应用还没发布,还在开发呢,为什么不让我删除语言??????????????????????????、