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

25 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Testing Right-to-Left localization in a macOS app
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?
2
0
80
16h
VoiceOver: Detect Languages
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
1
0
225
6d
App Store localization fallbacks
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.
1
0
318
Oct ’24
QLPreviewController's PencilKit sub component doesn't get mirrored on RTL Languages in iOS18b3
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.
5
0
647
Aug ’24
Localization for multiple targets
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 ?
3
0
600
Jul ’24
A curiosity question about the most frequent App Store users
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.
0
0
455
May ’24
Central American NSTimeZone instances returning CST rather than permanently CDT
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?
3
0
666
May ’24
Best way to determine region?
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
1
0
579
May ’24
Can't get Text Input Source region designator
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.
0
1
604
Apr ’24
Change App Availability
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?
0
0
531
Apr ’24
navigator.language returns system language only from iOS 17.4
I am developing a web application that works on webview. From iOS 13, users could set a specific language for each individual app, and every webview-based application knew the application language through navigator.language. However, in iOS 17.4, this API returns the system language instead of the individual app's language in web applications. Is this an official change in iOS 17.4 or a bug?
3
0
1.3k
Apr ’24
Inquiry about Paste Behavior in UITextView
I have encountered inconsistent paste behaviors in UITextView depending on whether the text is in English or Korean. When pasting at the beginning of a text with an English sentence in UITextView, a space is added after the pasted text. In the middle, spaces are added before and after the pasted text. However, when pasting at the end, only a space is added before the pasted text. On the other hand, when there is a Korean sentence in UITextView, pasting at the beginning results in the inclusion of "\n" at the beginning of the pasted text, while in other cases, no additional text is added upon pasting. I'm curious to know if this behavior is intentional. I would appreciate understanding the rationale behind appending "\n" in Korean text and the absence of additional text in other cases.
1
0
521
Apr ’24
ISSUE: iPhone validation issue while entering English Characters using Japanese Keyboard
Application: HTML,Javascript,Angular web Application Issue: In Iphone/Ipad while trying to enter English characters using Japanese keyboard in the input field the japanese keyboard freezes and stops working after entering the first character. Root Cause: Two validations given in the onInput call back method causes the issue. when the validation are removed keyboard is working fine 1.for converting lowercase letters to uppercase 2.Some Character are not allowed so they are replaced after input
0
0
713
Mar ’24
Can clear first character when using TextField with NumberFormatter and zeroSymbol set to ""
Hello, I have an issue with formatting text in a TextField. I want to maintain formatting to two decimal places and have it respond to changes in the device's settings, as it currently does. However, I want to get rid of the problem with deleting the first character, which for some reason cannot be empty even though it should start with an empty value. This is my code extension Formatter { static let numberFormatter: NumberFormatter = { let formatter = NumberFormatter() formatter.currencyCode = "GBP" formatter.currencySymbol = "" formatter.minimumFractionDigits = 2 formatter.maximumFractionDigits = 2 formatter.zeroSymbol = "" return formatter }() } struct HomeView: View { @FocusState private var isFocused: Bool @State var value: Double = 0 var body: some View { VStack { TextField("0.0", value: $value, formatter: Formatter.numberFormatter) .focused($isFocused) .border(.red) .keyboardType(.decimalPad) .toolbar { ToolbarItemGroup(placement: .keyboard) { if isFocused { Spacer() Button("Done") { isFocused = false } } } } } } } and here is the issue gif I found similar problems in other forums like in https://www.hackingwithswift.com/forums/swiftui/textfield-with-initial-empty-value-for-a-number/12486/15516 but unfortunately uncomment.
3
0
956
Feb ’24
Localized iOS App - Obtain Device Language (not App Language)
I have an localized iOS App from which I want to obtain the device language (not the app language). The following sample app is localized in English and German. The current app language is German. Here I want to obtain english, since that's the device language (see next screenshot). Device Language Settings: App Language Settings: (shouldn't be considered for obtaining device language) Is there any API I could use to retrieve the device language? To obtain the device language is a product management requirement to derive next steps in the app localization process. Code of sample App: struct ContentView: View { var body: some View { Form { Text("Hello, world") Text("Locale.preferredLanguages:\n\(Locale.preferredLanguages.joined(separator: ", "))") Text("Locale.current:\n\(Locale.current.language.languageCode?.identifier ?? "")") } } } Note: I have asked this question on Stack Overflow too (see here)
3
0
744
Jan ’24
Serbian language fallback
We want to implement Serbian (latin) language in our app. The idea is pretty simple: if user device's preferred language is Serbian (no matter, latin or cyrillic) – we use Serbian latin, which we have in our app. The problem is that it looks like this idea is unimplementable. If we use sr_Latn as code for Serbian latin in our Info.plist, and device's preferred language is just Serbian (which is Cyrillic in iOS) – the fallback in app will be English (default language), not Serbian latin. Reverse is the same: if we implement Serbian latin as sr (just Serbian), then user select Serbian latin (sr_Latn) as device's preferred language – then app language will be English, not Serbian. In the source code published on one of the forum's answer I see that it is expected fallback (unfortunately undocumented). This code is old one, but looks like behavior still persist. Is there any way to implement one Serbian for all cases?
3
0
784
Dec ’23