[tags:internationalization,localization]

97 results found

Post not yet marked as solved
3 Replies
371 Views
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)
Posted
by finebel.
Last updated
.
Post not yet marked as solved
3 Replies
Sorry for the late Reply (somehow I wasn't notified about your answers). @Claude31 I test on a real device. Thanks for the link. Unfortunately, the provided solution is nearly the same compared to what I have already tried with Locale.preferredLanguages above. @Frameworks Engineer To obtain the device language is a product management requirement to derive next steps in the app localization process.
Post not yet marked as solved
3 Replies
Hi, what’s your use case for fetching the device language instead of the preferred language?
Post not yet marked as solved
3 Replies
Do you test on device or on simulator ? I found that long thread that may provide some hint: https://developer.apple.com/forums/thread/9246
Post marked as solved
2 Replies
615 Views
I am seeing the following log in the console in Xcode Version 15.0.1 (15A507): Cannot use inflection engine (Checking that the token is the correct type): I am able to reproduce the issue using Apple's own sample code, Building a Localized Food-Ordering App associated with WWDC21 Session 10109: What's New In Foundation, simply by building and running the sample code. That log message immediately appears a few times in the console when running that sample project. I'm assuming given it is happening in Apple's own sample project, that this is merely console noise and basically something out of my control.
Posted
by JohnC2.
Last updated
.
Post not yet marked as solved
2 Replies
Thank you, great advice on Log Noise. Given the wording of the console message, it made it sound like I was doing something wrong, and yet the app behaved correctly. After looking over my code and implementation, everything seemed fine. At that point I went to check and compare sample code only to see the same message. With that said, I have filed Feedback #: FB13456050.
Post marked as solved
2 Replies
I think that’s a reasonable assumption. See On Log Noise for my criteria as to whether to worry about log entries like this. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Post not yet marked as solved
2 Replies
We believe it should now be possible to submit your app with the locale folder sq-XK.lproj.
Post not yet marked as solved
2 Replies
852 Views
Our application should support locales for Albanian and Albanian(Kosovo). Xcode creates sq.lproj and sq-XK.lproj folders accordingly Everything works fine in xcode, but if we upload to appstore we always see this warning. I tried specifying other names for sq-XK to match https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPInternational/LanguageandLocaleIDs/LanguageandLocaleIDs.html aln, sq-RS, sq-KV, sq-KS, sq-Latn-XQ. The varning was always present. Is there any way to get rid of it? WARNING ITMS-90176: Unrecognized Locale - The locale used in localization directories at (Payload/{AppName}.app/base.lproj) are invalid. iTunes supports BCP47 but not the UN M.49 specification. Refer to the Language and Locale Designations guide for more information on naming your language-specific directories.
Posted
by Andrey_D.
Last updated
.
Post not yet marked as solved
2 Replies
Try manually renaming your lproj folder from sq-XK.lproj to sq_XK.lproj. You should quit Xcode before doing this to ensure you don't have the project open in any capacity.
Post marked as solved
3 Replies
2.1k Views
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) ])
Posted
by rspoon3.
Last updated
.
Post marked as solved
3 Replies
usesBottomSafeArea is a new property introduced in iOS 17 to address this. Watch Keep up with the keyboard for more info. view.keyboardLayoutGuide.usesBottomSafeArea = false 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) ])
Post not yet marked as solved
3 Replies
Indeed it's very annoying. Trying to solve this same issue for a few days already. Apparently the only solution is fall back to the old approach reacting on keyboard related notifications etc.
Post not yet marked as solved
3 Replies
I've got the same problem. Is there still no solution to this yet? This is a very common use case, and any time someone wants to use keyboardLayoutGuide with a scroll view, it no longer becomes feasible.
Post not yet marked as solved
2 Replies
Thanks. Is that documented somewhere?