Is there a way to create a Date constant from year, month and day? The only constructors that show up are .now and those based on some timeInterval. I'm trying to initialize some test data with known dates.
Internationalization
RSS for tagMake your app available to an international audience by adapting it to multiple languages, regions, and cultures.
Posts under Internationalization tag
25 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
We have an app that has failed during the app review for the Japanese market but has been accepted in several other markets successfully.
We need the user's name in native Katakana format as we need it to be displayed in our restaurant Point of Sale systems for workers to be able to read and understand.
We use 'Sign up with Apple', but when doing so, if this returns an anglicised given and family name, we have to request the customer supply their Katakana format name so that our in-store systems and staff can process and fulfil their orders.
When the App Review process automatically tests the app, it uses "Apple John" as a customer's name. Since this is not a Japanese name, we ask for it again in the correct format, or we cannot allow the user to register.
This contravenes Apple's rules, and thus, our app is rejected. If the Apple identity used belonged to a user more typical of the target market, it would work as required.
Does anyone else have this issue, and how did you work around it?
Tim
Hi there
The behaviour of using Locale(identifier: "ar") with NumberFormatter.locale appears to have changed between iOS 17 and iOS 18.
Is this expected?
Steps to reproduce
import UIKit
func numberFormatter(withlocaleString localeString: String) -> NumberFormatter {
let locale = Locale(identifier: localeString)
let numberFormatter = NumberFormatter()
numberFormatter.locale = locale
return numberFormatter
}
let numbers = 0...9
let localeDigits = numbers
let ar_digits = localeDigits.compactMap {
numberFormatter(withlocaleString: "ar").string(for: $0)?.first
}
print(ar_digits)
Results
The results show:
**** numbering system on iOS 17
latn numbering system on iOS 18.
iOS
Output
iOS 17
["٠", "١", "٢", "٣", "٤", "٥", "٦", "٧", "٨", "٩"]
iOS 18
["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
when we launch the application and change the language from german/french to english or any other language then in also it is changing app language, but bluetooth connection screen with pair or cancel alert is showing on previous selected language. Since that alert is system alert, is there any wayto debug/resolve that issue.
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!
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.
my Date type data is "2024-12-28 15:00:00 +0000" and when I use Date formatter to format date with timezone TimeZone(identifier: "Asia/Seoul"), date formatter return wrong year like below
(lldb) po print(date); let formatter = DateFormatter(); formatter.timeZone = TimeZone(identifier: "Asia/Seoul"); formatter.dateFormat = "YYYY-MM-dd"; formatter.string(from: date)
2024-12-28 15:00:00 +0000
"2025-12-29"
(lldb) po print(date); let formatter = DateFormatter(); formatter.timeZone = .gmt; formatter.dateFormat = "YYYY-MM-dd"; formatter.string(from: date)
2024-12-28 15:00:00 +0000
"2024-12-28"
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!
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?
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
How does the App Store handle localized content fallbacks in the store listing, in app products, and game center content?
For example, if a user's language is set to Portuguese (Portugal) pt-PT, and I don't supply a translation for pt-PT but I do for pt-BR (Brazil), will it show the user the pt-BR translation or as a developer, do I need to provide both translations (i.e. all language variations/regions)?
Another example, if I provide translations for en-US and en-GB and the user's language is Australian English (en-AU), will it show en-US or en-GB on the store or in Game Center? I would expect it to use en-GB.
**My app contains 2 languages and it works fine when I use it, so it's not an app issue.
**
But on appstoreconnect it only shows me one language, why doesn't the second one appear?
appstoreconnect -> myapp -> distributions
This is what I would like to see
QLPreviewController's PencilKit doesn't get mirrored when used with a RTL language in iOS18b3.
Moreover, the sub-menu of the actions is not translated and is shown in English.
Steps to reproduce:
Set an app with QLPreviewController and set its app language to Hebrew (or any other RTL language)
Run the app
Tap the Markup button on bottom-left side.
Look on the PencilKit element.
Tap the + button to show the annotation actions.
Look on the annotation actions menu.
Current: The Pencil Kit element is not mirrored when app language is RTL Language and the sub-menu actions are shown in English.
Expected: The Pencil Kit element is mirrored when app language is RTL Language and the sub-menu actions are shown in the RTL Language.
Submitted Feedback: FB14452847
Notes:
This wasn't reproducible in iOS 17.5.1
The top bar buttons are mirrored as expected with a RTL language.
I have one project where I have XYZ scheme and target. I have Localizable.string under XYZ target for localization. I want to create a ABC target (duplicate of XYZ) and set custom language support for it. Let's say I have english, french and german for XYZ, I want hindi, japanese and chinese for ABC. I did the below steps
I went to Manage scheme and duplicated the XYZ (duplicate scheme = ABC).
I added new localization file only for ABC (LocalizationForABC.string) and made sure those reflect in File Inspector -> Target (only ABC selected) and also checked in Build Phases -> Copy Bundle Resources (LocalizationABC exists).
When I run the ABC target under let's say french, it works fine but when I build the project ABC, and remove french from XYZ, ABC is broken and it only runs in english.
Am I missing something here ?
Hello,
on the App Store I have two simple Safari extensions both for iOS and macOS, one app for iOS for testing and feedback purposes (so, even if it's a complex app, nothing of "serious" for the moment) and one mature and complex app for macOS. The last one is localized for the most important 12 languages, the others one are in english only (but due their simplicity are enough). At this moment they are all free apps.
The point is this one: overall in the macOS app I except a general interest for a mature and very interesting application, but seems that, independently from everything, the only real downloaders and users are the US ones. This is really demoralizing because this app needs to be known, but only the US audience is not enough. Only the 10% of downloaders are generally equally divided between UK, India, Canada, Brazil, China and Japan. So the keywords seem effectively findable.
Is it normal this huge difference? Not-US audience is more suspicious? There is a particular psychology difference between US and other countries?
Ok, probably most macOS users, with a recent hardware (this app require at minimum macOS 12.3 to work), are located in US. But the ratio US:rest of the world seems anyway unbalanced.
Thank you, have patience if my question is dumb.
I had some support tickets about dates not showing properly for customers based in the America/Merida timezone.
Essentially America/Merida permanently changed to -0500 (CDT) on October 31, 2021, and it appears that the NSTimeZone does not respect this change, and reports times as -0600 (CST).
Creating a little test tool with the following code:
+(void) run {
NSArray<NSString *> * args = [[NSProcessInfo processInfo] arguments];
if ([args count] > 1) {
NSString *timezone = args[1];
NSLog(@"custom TZ: %@", timezone);
NSTimeZone * tz = [NSTimeZone timeZoneWithName:timezone];
[NSTimeZone setDefaultTimeZone:tz];
}
NSDate * now = [NSDate date];
NSLog(@"Testing Dates: (local timezone : %@)", [NSTimeZone localTimeZone]);
NSLog(@" (default timezone: %@)", [NSTimeZone defaultTimeZone]);
NSLog(@" (is DST : %@)", [[NSTimeZone defaultTimeZone] isDaylightSavingTimeForDate:now] ? @"YES" : @"NO");
NSLog(@" (current cal-tz : %@)", [[NSCalendar currentCalendar] timeZone]);
NSLog(@" (current locale : %@)", [[NSLocale currentLocale] localeIdentifier]);
NSLog(@"Now: %@", now);
}
And running with the America/Merida timezone passed in, I'm getting the following output:
custom TZ: America/Merida
Testing Dates: (local timezone : Local Time Zone (America/New_York (EDT) offset -14400 (Daylight)))
(default timezone: America/Merida (CST) offset -21600)
(is DST : NO)
(current cal-tz : America/Merida (CST) offset -21600)
(current locale : en_US)
Now: Tue May 14 15:06:14 2024
Running the same code on Linux via the GNUStep implementation of Objective-C, I get the correct output with America/Merida showing up as CDT (ie (is DST : YES)).
Are there any good ways to work around this?
My app downloads files from AWS S3. What we'd like to do is replicate our files across several of Amazon's data centers (regions) to put the content closer to our users, who are worldwide.
What I need is a way to determine in a very ***** way which data center would be best to use. For example North America, Europe, Asia, etc. I don't want to use location services since I don't really need the exact location. Is there a simpler way to do this?
I suppose I could use the localization settings, but I don't think that's really guaranteed to represent their actual location.
Thanks,
Frank
I want to change the display language, particularly for week and the year and date on MultiDatePicker.
By adjusting the locale, the year and date can be changed.
However, I'm unable to change the display for week .
I've tried several methods, such as setting the calendar and adjusting the time zone, but none of them seem to work.
Are there any good way to solve it?
I have a macOS application with a minimum version of macOS 12.0. I need to be able to get the current keyboard region designator.
Example: The user selects a input source of English Canadian. What I want as a result of this fact is en-CA locale identifier.
I get the current keyboard language with the following code
func keyboardLanguage() -> String?{
let keyboard = TISCopyCurrentKeyboardInputSource().takeRetainedValue()
let languagesPtr = TISGetInputSourceProperty(keyboard, kTISPropertyInputSourceLanguages)!
let languages = Unmanaged<AnyObject>.fromOpaque(languagesPtr).takeUnretainedValue() as? [String]
return languages?.first
}
This returns the language as en, but I don't see how I can get the region from Text Input Sources. I can get the input source id
let keyboard = TISCopyCurrentKeyboardInputSource().takeRetainedValue()
let idPtr = TISGetInputSourceProperty(keyboard, kTISPropertyInputSourceID)!
let id = Unmanaged<AnyObject>.fromOpaque(idPtr).takeUnretainedValue() as? String
print(String(describing: id))
This prints com.apple.keylayout.Canadian which points to the Canadian region but is not a region designator. I can possible parse this id and map it to a region designator but first I'm not sure if I will capture all of the regions and secondly what happens if the format of the id changes? If someone can point to the correct API to use it will be much appreciated.
My app is only available in some regions.
During one of the review versions, the reviewer asked to remove accessibility from one of the countries or provide documents that allow to conduct activities in this country.
At that time, there was no such document and I removed the availability in this country.
Now - I have a document that confirms that I can conduct activities in this country. Availability is a separate section and is not related to versioning.
How and where do I request app availability in a specific country?