Internationalization

RSS for tag

Make your app available to an international audience by adapting it to multiple languages, regions, and cultures.

Posts under Internationalization tag

140 Posts

Post

Replies

Boosts

Views

Activity

Punctuation missing from system font when Chinese language is selected
Dear experts, I get glyphs from the system font using CTFontGetGlyphsForCharacters, something like this: UIFont* uifont = [UIFont monospacedDigitSystemFontOfSize: s weight: w]; CTFontRef font = (__bridge CTFontRef)uifont; CTFontGetGlyphsForCharacters(font, ....); The characters that I ask for are basically latin-1 plus a few others. The app is not localised for Chinese. When I change the phone's default language to Chinese, this code gets glyphs for most characters OK but it fails for a few punctuation symbols: 91 = [ 93 = ] 183 = middle dot 8220 = left double curly quote 8221 = right double curly quote Can anyone guess what's going on here? What's special about those characters? Thanks, Phil.
0
0
1.3k
Sep ’23
Separate App versions per region
Due to our app having different government clearances in each geographical region, we are required to have a different version in each region. While the apps are all fundamentally the same, is there any reason we can't have: OurApp US - available in US OurApp UK - available in UK only OurApp EU - available in EU only While I understand how to implement this, there is concern that the subsequent submissions might be flagged incorrectly by the 4.3 Spam rule. Users would never see more than one version of our app in their region's App Store. Does anyone have any knowledge or experience here? Is this kind of release strategy acceptable?
0
4
1.1k
Sep ’23
How to ignore the safe area when using keyboardLayoutGuide
I have a full screen list and want to use the new keyboardLayoutGuide constraint, but by default it uses the safe area inset. How can I disable this so my list goes all the way to the bottom of the screen when the keyboard is not shown? NSLayoutConstraint.activate([ collectionView.topAnchor.constraint(equalTo: view.topAnchor), collectionView.bottomAnchor.constraint(equalTo: view.keyboardLayoutGuide.topAnchor), collectionView.leadingAnchor.constraint(equalTo: view.leadingAnchor), collectionView.trailingAnchor.constraint(equalTo:  view.trailingAnchor) ])
3
1
4.6k
Aug ’23
Date and time getting fail to convert in 24 hour, after change format in 12 hour from device setting
I have been working on a Calendar App. i am getting date format 2023-08-25T7:07:00 pm which is not parsing in any date format. Required Output: 2023-08-25T19:07:00 Getting fail with all date formatter Here is the my code snippet let dateFormatter = DateFormatter() dateFormatter.dateFormat = "yyyy-MM-dd'T'hh:mm:ss a" dateFormatter.locale = Locale(identifier: "en_US_POSIX") dateFormatter.timeZone = TimeZone.current if let date = dateFormatter.date(from: dateString) { let formattedDateString = dateFormatter.string(from: date) print(formattedDateString) } else { print("Invalid date format") } Help me on this.
2
0
920
Aug ’23
App managed by 2 organizations/ App management for different countries
Hello, I have an app which offers content and users can have access through a montly subscription în app. We plan to expand in a different Country in which we need a different Organization as owner of the app and the revenue genereted from users in the new released country should go to the new organization. If there a way to keep the same app in store but to have multiple entities to manage them for different countries??
0
0
914
Aug ’23
App is terminated when user changes language
Dear Experts, NSLocale has a notification NSCurrentLocaleDidChangeNotification and a property autoupdatingCurrentLocale ("A locale which tracks the user’s current preferences"). These suggest that an app should be able to detect when the user changes their language preference while running, or when it is resumed from the background. In practice, when I change language in the Settings app (either globally or just for my app), the app is terminated by iOS and restarts with new locale. Is this the expected behaviour? I am wondering if there is something I need to do to advertise that the app can adopt language changes without restarting, or something. Maybe only date-time formats, etc., trigger the notification but language changes don't?
2
0
1.9k
Jul ’23
DateFormatter localized abbreviated months
Using Swift's DateFormatter class, how does it convert abbreviated date format to languages that don't support abbreviated month names e.g. Urdu For Example, the following code doesn't return the correct Urdu translation for abbreviated Month format. let dateFormatter = DateFormatter() dateFormatter.dateFormat = "MMM d, yyyy" dateFormatter.locale = Locale(identifier: "ur-IN") let date = Date() let formattedDate = dateFormatter.string(from: date) print(formattedDate) // Expected: "جولائی ۱۲, ۲۰۲۳" for Jul 12, 2023 // Actual: "جول ۱۲, ۲۰۲۳"
2
0
1.5k
Jul ’23
NumberFormatter not correctly identifying Locale currency settings in iOS 17 beta with Xcode 15.0 beta
I'm currently developing an application for iOS and I recently updated to the iOS 17 beta along with Xcode 15.0 beta. I am trying to use NumberFormatter to format a Double to a currency string (in my case, American Dollars $). Here is the snippet of my code: let formatter = NumberFormatter() formatter.currencySymbol = Locale.current.currencySymbol print(Locale.current.currency) print(Locale.current.currencySymbol) print(Locale.current.currency?.identifier) print(Locale.current) formatter.numberStyle = .currency When running this on iOS 16, I get the following output: Optional("$") Optional("USD") en_US (current) However, when running the same code on iOS 17 beta, the output is different: nil Optional("¤") nil en_001 (fixed) It appears that the Locale's currency and identifier properties are returning nil, and the Locale itself is being identified differently. Has anyone else encountered this issue with iOS 17 beta and Xcode 15.0 beta? Is this a bug in the beta versions, or have there been changes in the way Locale should be used for currency formatting?
2
1
1.8k
Jun ’23
TextFiled lost focus and no key input on Japanese input Romaji mode
I write macOS menu app with TextField by SwiftUI on Japanese Input mode. On some conditions, the TextFiled lost focus, no key input, no mouse click. User cannot do anything. Setup MacOS Ventura 13.3.1 (a) Install Japanese Romaji Input source by System Preferences -> Keyboard Set input mode as "Romaji" Build test source code On Xcode 14.3, create new macOS app project "FocusTest" with SwiftUI, Swift. Replace FocusTestApp.swift with attached code. Build on Xcode Steps Set input mode as "Romaji" Run FocusTestApp Click T square icon on top menu Small windows with globe appear Click Desktop background area Click T square icon on top menu Click PIN T with PIN textField View appear That textField lost focus, click inside of textField Key or click is not accepted. With US keyboard mode, key input become possible on Step 10. But Focused blue square is missing. Code of FocusTestApp.swift import SwiftUI @main struct focusTestApp: App { var body: some Scene { MenuBarExtra("Test", systemImage: "t.square") { MainView() }.menuBarExtraStyle(.window) } } struct MainView: View { @State private var showingPIN: Bool = false var body: some View { VStack { Image(systemName: "globe") .imageScale(.large) .foregroundColor(.accentColor) Button("PIN") { print("clicked") showingPIN = true } } .padding() .sheet(isPresented: $showingPIN) { PinView() } } } struct PinView: View { @Environment(\.presentationMode) var presentationMode @State private var pin: String = "" @FocusState private var pinIsFocused: Bool var body: some View { VStack { Image(systemName: "t.square") .resizable() .aspectRatio(contentMode: .fit) .frame(width: 64.0, height: 64.0) .foregroundColor(.accentColor) Text("Enter PIN code") HStack { TextField("", text: $pin) .font(Font.system(size: 28, design: .default)) .frame(width:4*28.0, height:28.0) .focusable() .focused($pinIsFocused) } .onAppear(){ pinIsFocused = true } } .padding() } }
0
2
1.9k
May ’23
New keyboard
As a classical Arabic, student, learning the Arabic lanaguage, using the English keyboard is a big part of our journey. I hope Apple, can add a keyboard that is English(Arabic), because using the English alphabet is a big part of us students, learning the foreign language for pronunciation and writting/reading skills. Thankyou for considering!
1
0
1.2k
May ’23
Key equivalent matching for non-US English keyboard layouts
Based on these Swift docs and this forum thread, keyboard shortcuts / key equivalents are expected to be declared based on a US English layout. As an application developer, you may then rely on the auto localization provided by allowsAutomaticKeyEquivalentLocalization, (for menus) or localize your key equivalents manually (menus and other controls with key equivalents). But how does AppKit handle non localized key equivalents when faced with a non-US English keyboard layout? In particular, with a Hebrew layout active, the C key unmodified produces "ב", but when modified with ⌘ produces "c". Does AppKit compare the key equivalent ⌘c to the modified or un-modified char of the event, or both? Or is there more to this logic? E.g. does it also try to match the incoming event against a US-English layout, even if not active at the moment? The use-case here is implementing performKeyEquivalent for a custom control, where the documentation says: You should extract the characters for a key equivalent using the NSEvent method charactersIgnoringModifiers. So would simply comparing the event modifiers to the key equvialent modifers, and the event charactersIgnoringModifiers to the key equivalent give similar behavior to AppKit's own logic, e.g. in [NSEvent _matchesKeyEquivalent:modifierMask:]? Based on the observed behavior when pressing ⌘c with a Hebrew layout active, it does trigger an NSButton with a key equivalent of ⌘c, which doesn't seem to match the documented behavior of using the unmodified chars ("ב") as basis.
3
1
1.9k
May ’23
App crash on launch only in Ireland
The App review said that our App crashed on launch in Cork, Ireland. When they tested it in the U.S., it works well. We also don't have any problem testing it using TestFlight in Taiwan. We've tried to VPN to Ireland and open the app from TestFlight but it still works well. Does anyone have this regional problem or know how to reproduce it? Development environment The app is developed by React Native (version 0.70.5), using the Expo framework (Expo SDK 47)
5
0
1.3k
Apr ’23
Issue: [Inflection] Cannot use Morphun
Hi community: I get an error using inflection on strings when the language is Spanish. Issue: [Inflection] Cannot use Morphun, (Checking that the token is the correct type): (null) The code: let value = "5 dias" var string = AttributedString(localized: "El primer \(value) es gratis") var morphology = Morphology() morphology.number = .plural string.inflect = InflectionRule(morphology: morphology) let result = string.inflected() Any workaround to solve it?
0
0
1.2k
Mar ’23
Punctuation missing from system font when Chinese language is selected
Dear experts, I get glyphs from the system font using CTFontGetGlyphsForCharacters, something like this: UIFont* uifont = [UIFont monospacedDigitSystemFontOfSize: s weight: w]; CTFontRef font = (__bridge CTFontRef)uifont; CTFontGetGlyphsForCharacters(font, ....); The characters that I ask for are basically latin-1 plus a few others. The app is not localised for Chinese. When I change the phone's default language to Chinese, this code gets glyphs for most characters OK but it fails for a few punctuation symbols: 91 = [ 93 = ] 183 = middle dot 8220 = left double curly quote 8221 = right double curly quote Can anyone guess what's going on here? What's special about those characters? Thanks, Phil.
Replies
0
Boosts
0
Views
1.3k
Activity
Sep ’23
Separate App versions per region
Due to our app having different government clearances in each geographical region, we are required to have a different version in each region. While the apps are all fundamentally the same, is there any reason we can't have: OurApp US - available in US OurApp UK - available in UK only OurApp EU - available in EU only While I understand how to implement this, there is concern that the subsequent submissions might be flagged incorrectly by the 4.3 Spam rule. Users would never see more than one version of our app in their region's App Store. Does anyone have any knowledge or experience here? Is this kind of release strategy acceptable?
Replies
0
Boosts
4
Views
1.1k
Activity
Sep ’23
How to ignore the safe area when using keyboardLayoutGuide
I have a full screen list and want to use the new keyboardLayoutGuide constraint, but by default it uses the safe area inset. How can I disable this so my list goes all the way to the bottom of the screen when the keyboard is not shown? NSLayoutConstraint.activate([ collectionView.topAnchor.constraint(equalTo: view.topAnchor), collectionView.bottomAnchor.constraint(equalTo: view.keyboardLayoutGuide.topAnchor), collectionView.leadingAnchor.constraint(equalTo: view.leadingAnchor), collectionView.trailingAnchor.constraint(equalTo:  view.trailingAnchor) ])
Replies
3
Boosts
1
Views
4.6k
Activity
Aug ’23
Date and time getting fail to convert in 24 hour, after change format in 12 hour from device setting
I have been working on a Calendar App. i am getting date format 2023-08-25T7:07:00 pm which is not parsing in any date format. Required Output: 2023-08-25T19:07:00 Getting fail with all date formatter Here is the my code snippet let dateFormatter = DateFormatter() dateFormatter.dateFormat = "yyyy-MM-dd'T'hh:mm:ss a" dateFormatter.locale = Locale(identifier: "en_US_POSIX") dateFormatter.timeZone = TimeZone.current if let date = dateFormatter.date(from: dateString) { let formattedDateString = dateFormatter.string(from: date) print(formattedDateString) } else { print("Invalid date format") } Help me on this.
Replies
2
Boosts
0
Views
920
Activity
Aug ’23
App managed by 2 organizations/ App management for different countries
Hello, I have an app which offers content and users can have access through a montly subscription în app. We plan to expand in a different Country in which we need a different Organization as owner of the app and the revenue genereted from users in the new released country should go to the new organization. If there a way to keep the same app in store but to have multiple entities to manage them for different countries??
Replies
0
Boosts
0
Views
914
Activity
Aug ’23
App is terminated when user changes language
Dear Experts, NSLocale has a notification NSCurrentLocaleDidChangeNotification and a property autoupdatingCurrentLocale ("A locale which tracks the user’s current preferences"). These suggest that an app should be able to detect when the user changes their language preference while running, or when it is resumed from the background. In practice, when I change language in the Settings app (either globally or just for my app), the app is terminated by iOS and restarts with new locale. Is this the expected behaviour? I am wondering if there is something I need to do to advertise that the app can adopt language changes without restarting, or something. Maybe only date-time formats, etc., trigger the notification but language changes don't?
Replies
2
Boosts
0
Views
1.9k
Activity
Jul ’23
DateFormatter localized abbreviated months
Using Swift's DateFormatter class, how does it convert abbreviated date format to languages that don't support abbreviated month names e.g. Urdu For Example, the following code doesn't return the correct Urdu translation for abbreviated Month format. let dateFormatter = DateFormatter() dateFormatter.dateFormat = "MMM d, yyyy" dateFormatter.locale = Locale(identifier: "ur-IN") let date = Date() let formattedDate = dateFormatter.string(from: date) print(formattedDate) // Expected: "جولائی ۱۲, ۲۰۲۳" for Jul 12, 2023 // Actual: "جول ۱۲, ۲۰۲۳"
Replies
2
Boosts
0
Views
1.5k
Activity
Jul ’23
NumberFormatter not correctly identifying Locale currency settings in iOS 17 beta with Xcode 15.0 beta
I'm currently developing an application for iOS and I recently updated to the iOS 17 beta along with Xcode 15.0 beta. I am trying to use NumberFormatter to format a Double to a currency string (in my case, American Dollars $). Here is the snippet of my code: let formatter = NumberFormatter() formatter.currencySymbol = Locale.current.currencySymbol print(Locale.current.currency) print(Locale.current.currencySymbol) print(Locale.current.currency?.identifier) print(Locale.current) formatter.numberStyle = .currency When running this on iOS 16, I get the following output: Optional("$") Optional("USD") en_US (current) However, when running the same code on iOS 17 beta, the output is different: nil Optional("¤") nil en_001 (fixed) It appears that the Locale's currency and identifier properties are returning nil, and the Locale itself is being identified differently. Has anyone else encountered this issue with iOS 17 beta and Xcode 15.0 beta? Is this a bug in the beta versions, or have there been changes in the way Locale should be used for currency formatting?
Replies
2
Boosts
1
Views
1.8k
Activity
Jun ’23
TextFiled lost focus and no key input on Japanese input Romaji mode
I write macOS menu app with TextField by SwiftUI on Japanese Input mode. On some conditions, the TextFiled lost focus, no key input, no mouse click. User cannot do anything. Setup MacOS Ventura 13.3.1 (a) Install Japanese Romaji Input source by System Preferences -> Keyboard Set input mode as "Romaji" Build test source code On Xcode 14.3, create new macOS app project "FocusTest" with SwiftUI, Swift. Replace FocusTestApp.swift with attached code. Build on Xcode Steps Set input mode as "Romaji" Run FocusTestApp Click T square icon on top menu Small windows with globe appear Click Desktop background area Click T square icon on top menu Click PIN T with PIN textField View appear That textField lost focus, click inside of textField Key or click is not accepted. With US keyboard mode, key input become possible on Step 10. But Focused blue square is missing. Code of FocusTestApp.swift import SwiftUI @main struct focusTestApp: App { var body: some Scene { MenuBarExtra("Test", systemImage: "t.square") { MainView() }.menuBarExtraStyle(.window) } } struct MainView: View { @State private var showingPIN: Bool = false var body: some View { VStack { Image(systemName: "globe") .imageScale(.large) .foregroundColor(.accentColor) Button("PIN") { print("clicked") showingPIN = true } } .padding() .sheet(isPresented: $showingPIN) { PinView() } } } struct PinView: View { @Environment(\.presentationMode) var presentationMode @State private var pin: String = "" @FocusState private var pinIsFocused: Bool var body: some View { VStack { Image(systemName: "t.square") .resizable() .aspectRatio(contentMode: .fit) .frame(width: 64.0, height: 64.0) .foregroundColor(.accentColor) Text("Enter PIN code") HStack { TextField("", text: $pin) .font(Font.system(size: 28, design: .default)) .frame(width:4*28.0, height:28.0) .focusable() .focused($pinIsFocused) } .onAppear(){ pinIsFocused = true } } .padding() } }
Replies
0
Boosts
2
Views
1.9k
Activity
May ’23
New keyboard
As a classical Arabic, student, learning the Arabic lanaguage, using the English keyboard is a big part of our journey. I hope Apple, can add a keyboard that is English(Arabic), because using the English alphabet is a big part of us students, learning the foreign language for pronunciation and writting/reading skills. Thankyou for considering!
Replies
1
Boosts
0
Views
1.2k
Activity
May ’23
Key equivalent matching for non-US English keyboard layouts
Based on these Swift docs and this forum thread, keyboard shortcuts / key equivalents are expected to be declared based on a US English layout. As an application developer, you may then rely on the auto localization provided by allowsAutomaticKeyEquivalentLocalization, (for menus) or localize your key equivalents manually (menus and other controls with key equivalents). But how does AppKit handle non localized key equivalents when faced with a non-US English keyboard layout? In particular, with a Hebrew layout active, the C key unmodified produces "ב", but when modified with ⌘ produces "c". Does AppKit compare the key equivalent ⌘c to the modified or un-modified char of the event, or both? Or is there more to this logic? E.g. does it also try to match the incoming event against a US-English layout, even if not active at the moment? The use-case here is implementing performKeyEquivalent for a custom control, where the documentation says: You should extract the characters for a key equivalent using the NSEvent method charactersIgnoringModifiers. So would simply comparing the event modifiers to the key equvialent modifers, and the event charactersIgnoringModifiers to the key equivalent give similar behavior to AppKit's own logic, e.g. in [NSEvent _matchesKeyEquivalent:modifierMask:]? Based on the observed behavior when pressing ⌘c with a Hebrew layout active, it does trigger an NSButton with a key equivalent of ⌘c, which doesn't seem to match the documented behavior of using the unmodified chars ("ב") as basis.
Replies
3
Boosts
1
Views
1.9k
Activity
May ’23
Country/Region Availability
I'm curious if there is a way I can make my iOS App available to download in Ethiopia, Africa which is where my users are located. I've checked Pricing & Availability setting on the App Store Connect and have selected all 175 countries/regions but Ethiopia is not on that list. Does this mean it simply will not be available there?
Replies
2
Boosts
1
Views
1.9k
Activity
Apr ’23
App crash on launch only in Ireland
The App review said that our App crashed on launch in Cork, Ireland. When they tested it in the U.S., it works well. We also don't have any problem testing it using TestFlight in Taiwan. We've tried to VPN to Ireland and open the app from TestFlight but it still works well. Does anyone have this regional problem or know how to reproduce it? Development environment The app is developed by React Native (version 0.70.5), using the Expo framework (Expo SDK 47)
Replies
5
Boosts
0
Views
1.3k
Activity
Apr ’23
How to exclude/remove/disable an extension by region/country?
Hi, My application contains some extensions and one of them is the Call Directory extension. Because of uncompleted works, I don't want that extension to be available in a specified country, e.g. Vietnam. Can I exclude/remove/disable that extension if users download my application from App Store Vietnam? Thanks!
Replies
2
Boosts
0
Views
1.1k
Activity
Apr ’23
Issue: [Inflection] Cannot use Morphun
Hi community: I get an error using inflection on strings when the language is Spanish. Issue: [Inflection] Cannot use Morphun, (Checking that the token is the correct type): (null) The code: let value = "5 dias" var string = AttributedString(localized: "El primer \(value) es gratis") var morphology = Morphology() morphology.number = .plural string.inflect = InflectionRule(morphology: morphology) let result = string.inflected() Any workaround to solve it?
Replies
0
Boosts
0
Views
1.2k
Activity
Mar ’23