Localization

RSS for tag

Localization is the process of adapting and translating your app to multiple languages.

Localization Documentation

Posts under Localization tag

135 Posts
Sort by:
Post not yet marked as solved
0 Replies
239 Views
Hi, There is 2 language selections for my app. One (German) is set as the primary, english secondary language. In app store connect there are correctly 2 languages listed. Now after publishing my app, I only see English. It should be English+1 (where German is also listed) or German+1 (where English is also listed). Why is it not recognized that I have 2 languages enabled?
Posted
by
Post not yet marked as solved
3 Replies
466 Views
My app have different app names for en-US, Ja-jp and en-CA. CFBundleDisplayName is not getting localized for en-CA while it's working perfectly for other regional english such as en-GB,en-NZ. appName was working fine with iOS 15.4. I notice this issue only with ios16+.
Posted
by
Post not yet marked as solved
3 Replies
503 Views
Hello. I have a strange issue with localized text. On some device (iPhone X with iOS 15.2.1 and iPhone 14 Pro with iOS 16.7.2) the localized isn't loaded and the UILabel is empty. In all the others UILabel in the view the localized text is correctly showed. It works perfectly on iPhone 8 with iOS 16.4.1, iPhone 8 with iOS 16.7 iPhone 12 with iOS 17.3, and also on iPhone 14 Pro 17.2 Simulator. Below the text from the localizable file: "m_alert_message" = "E' disponibile nello store la nuova App CAME Access. Vuoi iniziare la procedura per trasferire i dati di impianto nella nuova App?"; and how set the text property of the UILabel: messageLabel.text = NSLocalizedString("m_alert_message", comment: "") messageLabel.lineBreakMode = .byWordWrapping messageLabel.textAlignment = .center messageLabel.numberOfLines = 0 messageLabel.font = UIFont(name: XipAppearance.fontName, size: XipAppearance.fontSizeText) containerView.addSubview(messageLabel) Another strange thing is all other texts in all other views are correctly loaded and showed. Does anyone have any idea what the problem might be?
Posted
by
Post not yet marked as solved
3 Replies
390 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
Post not yet marked as solved
0 Replies
247 Views
I have now finished my app I am learning with for different translations in different localizations and have placed the strings in the StringCatalog. I still have one question about the localization: In my project info I have added the item Localization and added the value German. So far I have told the AppStore that the app language is German. Can I delete this localization item in the info now? Or what does this entry do (see screenshot)? Due to the different languages in the StringCatalog, I now have the languages of the StringCatalog in the project settings under Localizations. This is always followed by Resources 0 Files Localized. What is this all about?
Posted
by
Post not yet marked as solved
0 Replies
210 Views
Hello everyone ! I currently experience an issue with the language of our website banners. Despite having translations set in Localizable Information for titles in English, French, German and Italian, the banners aren't adapting to the user's chosen language. The title always displays in French, while subtitle ("Open in the app") remains in English, irrespective of the user's language preference. Would anyone know how can I make sure that our banners dynamically translate according to the user's language choice? Is there a setting somewhere in the apple product page that I'm missing? Thanks
Posted
by
Post not yet marked as solved
2 Replies
315 Views
Localization on 15.0.1 version of Xcode has issue with search filter. It clears the search text on language change. This is such a big hassle while searching and updating the new language values, Need to copy and paste id every time when have to change the value on each of the language.
Posted
by
Post not yet marked as solved
1 Replies
406 Views
I implemented multiple languages through Localizable.strings in the visionOS App. Now I want to test whether multiple languages can work properly, so I want to change the system language in the settings before testing, but I can't find the relevant page in the settings. What should I do?
Posted
by
Post not yet marked as solved
0 Replies
620 Views
Hi everyone, I'm currently working on a React Native app and need assistance with localization. Specifically, I've added an InfoPlist.strings file for NSUserTrackingUsageDescription and created language-specific files for each supported language. However, when I try to build the app in Xcode (version 15.0.1), I encounter the following error: error: unable to open dependencies file (/Users/myname/Library/Developer/Xcode/DerivedData/myproject-bxfjslkrewxnfcgmeelilvixy/Build/Intermediates.noindex/myproject.build/Debug-iphonesimulator/myproject.build/DerivedSources/Users/myname/projects/project-folder/ios/en.lproj/InfoPlist.strings.d) (in target 'myproject' from project 'myproject') Any insights or solutions would be greatly appreciated. Thank you!
Posted
by
Post not yet marked as solved
2 Replies
317 Views
Hi, I am facing the following problem: I have a framework that has localisation for a few languages. When the framework is used in an application that has only support for English the frameworks's content is shown in English as well, even tho it has support for the device language. Is this behaviour expected and is there a clean work around this. I couldn't find any official documentation about this.
Posted
by
Post not yet marked as solved
3 Replies
1.2k Views
Hey everyone, I have translated my app using the newest String Catalog feature but im wondering how can I translate the strings from the Target -> Info tab. I have read the string catalog documentation and searched on the internet but I can't find a recent post talking about it. I have found methods related to the info.plist file but afaik that would be legacy documentation as I can't even find a info.plist file in my project anymore. Also tried to look for posts talking about it here, but maybe I'm not using the right words as I couldn't find anything. I only found this article that mentions translating the strings from info but still couldn't see how to do it: https://developer.apple.com/documentation/bundleresources/information_property_list/managing_your_app_s_information_property_list#3375316 So if someone could help me out, it would be very appreciated, thanks. EDIT: I just followed the "creating a infoplist.strings" way and it worked, but im still wondering if there is a newer way to do it. I tried to just add a manual string in the string catalog using "NSContactsUsageDescription" as key but it didn't work
Posted
by
Post not yet marked as solved
1 Replies
432 Views
Hello, I migrated a project to use String Catalogs (Localizable.xcstrings) instead of Localized.strings and Localized.stringsdict files. So far so good, but since I use a lot localized strings in my project, there are quite some localizations used more than once in different contexts and thus with different comments. For example: Source file 1: String(localized: "Something", comment: "Button title for context1") Source file 2: String(localized: "Something", comment: "Column title for context2") This results to a Localized.xcstrings file with this content: { "sourceLanguage" : "en", "strings" : { "Something" : { "comment" : "Column title for context2\nButton title for context1" } }, "version" : "1.0" } The main problem with this is, that the order of the concatenated comment changes randomly during each build. After the next Xcode build (without any code changes), the same Localized.xcstrings file might look like this: { "sourceLanguage" : "en", "strings" : { "Something" : { "comment" : "Button title for context1\nColumn title for context2" } }, "version" : "1.0" } This leads to false positives when trying to commit changes to a git repository, which is quite annoying. Am I the only one, having issues with comments in String Catalogs and git?
Posted
by
Post not yet marked as solved
0 Replies
440 Views
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?
Post marked as solved
2 Replies
635 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
Post not yet marked as solved
0 Replies
356 Views
Hello. We are currently creating our dmg with hdiutil and I was wondering if it would be possible to have localized resources in it. Right now, we have a single background image for every locale. Would it be possible to have different background image based on user locale, also with default background image as a backup in case we don't have users locale? The use case for this is the Quebec's Bill 96 Law 14, stating that products sold in Quebec have to be localised in Canadian french. Thank you.
Posted
by
Post marked as solved
1 Replies
469 Views
I am currently facing a problem where I want to localize the application's CFBundleDisplayName in Canadian English (amongst other languages and regions). It works well for all other use cases, including Canadian French. However for Canadian English, the app's name is just displayed in the main English localization (en). To find out what is wrong, I set up a totally empty project and only localized the name - it doesn't work. I changed the type of localization from Strings file (legacy) to String catalog, same error. I summarized everything in this screenshot: I've spent so much time already and still can't figure out what is happening. Can someone maybe quickly create a new project with the two localizations like in my screenshot and report if the same problem exists for English (Canada)? TLDR: Localization of CFBundleDisplayName works for fr-CA but not for en-CA, problem exists even in minimal reproducible example (empty project with CFBundleDisplayName localization)
Posted
by
Post marked as solved
2 Replies
386 Views
Localising my app I found the entire process quite un-swift like (i.e. unsafe and unintuitive) and was not the only one, even the great Paul Hudson also thought it a strange implementation. Following a tutorial by Andrii Halabuda (https://www.youtube.com/watch?v=_PBA20ZVk1A) relying on an Enum to reduce errors, I found that the strings needed in the "Localizable.strings" strings file could not be avoided. I have not tried localisation in SwiftUI, I see that it is different, is it easier i.e. can Plists and such be avoided ? Is there any word on deeper integration that is just more like a normal method ?
Posted
by
Post not yet marked as solved
2 Replies
464 Views
Hello. I have an app in the app store that I have localized into several languages. But the list of languages that the app supports in the App Store lacks English, which is the main language (and the language I developed the app in). I'm localizing the text by using String with a "localized" key and a defaultValue (in English). I also created a localization string catalog where I added added the values for each key on each language. On Xcode (15.0.1), in the app file, info, localization section I see that all languages are there with green checkmarks, except English which is at the top and is the default language. However, when I build, archive and send the bundle to AppStoreConnect, the Localizations in the Store Information section for the bundle does not include English, and so on the AppStore it looks like the app supports all of the additional languages but it does not list English. I can't figure out exactly what I'm missing. Can anyone help?
Posted
by
Post not yet marked as solved
1 Replies
483 Views
I use String Catalog to localize my app (built in English) to Japanese. The app works fine and supports both languages. I have tested on TestFlight, and the live version download from App Store also supports 2 languages. But the display on App Store only indicates Japanese. I have no idea why the number for localized files show 0 for both English and Japanese. The Localization of Japanese works fine. How to fix this?
Posted
by
Post not yet marked as solved
0 Replies
383 Views
I'm trying to run UITests just once. However, Xcode by default seems to run every permutation of light/dark color theme and device orientation and localizations. This means all UITests run 8 times (with 1 additional localization besides English). With tests that can take a couple minutes, the time to run all these adds up. Nothing in my UITest depends on the color theme, so I'd like to turn those permutations off always. The orientation and localization variations I might want sometimes but would generally also like to turn off. Questions: Can I disable any/all of these permutations? How can I get the locale string for the current run? I've tried using Locale(identifier: Locale.preferredLanguages.first!) but this just gets the device language, not the language being used on that run of the UI Test. Minimal reproducible example: Make a new SwiftUI app project in Xcode 15. Add a UI Testing Bundle target Add a localization in the general app settings, then add a string catalog called Localizable and at least one string's translation in that string catalog. Run a UITest Observe that it runs 8 times. Thanks for the help!
Posted
by