Localization

RSS for tag

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

Posts under Localization tag

120 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Export Localizations Build Error on Specific Pod's Umbrella.h File
Hello, I am reaching out as I have encountered a problem while working with Xcode (versions 1.4.3 and 1.4.3.1), targeting iOS 16, that has me stumped. I currently have a project with multiple targets, all of which build successfully under normal circumstances. However, when I try to export localizations, I encounter build errors specifically related to a pod's umbrella.h header file. I want to stress that no such issues occur during regular builds for any of my targets. Given the nature of the error, I am wondering if there are specific flags or settings that are applied during the build process for exporting localizations that could potentially differ from a regular build. If there are, could these differences account for the discrepancies I am witnessing in terms of the success of the regular build versus the failure of the export localizations process? I would greatly appreciate any insights or guidance on how to resolve this. If anyone has encountered a similar issue or knows of any differences in the build process when exporting localizations, I'd be thankful for your input. Thank you in advance for your time and help.
5
1
1.1k
Sep ’23
Xcode 15 beta strings catalog
Hey, I'm trying the new strings catalog, and I have a script that I would like to run on the xcstrings json. My question is there some documentation on the json format (what keys can it have, and values)? Also, I didn't try it yet, but what if I set for example 50 languages and 1000 localization keys, is that json really scalable? It could grow quite large, would xcode still keep it as one big file, or it would somehow split it into chunks? Would be happy for any info from the dev teams, thanks!
2
1
1.8k
May ’24
Are Swift Packages supported by String Catalogs?
Hello, do the String Catalogs (new in Xcode 15) support Swift Packages? I've tried adding a new Localizable.xcstrings (string catalog) file to my package's resources folder. Great! I then see this screen: All good so far. I then try to go and build my Swift Package... and nothing changes. The string catalog is never populated and I'm left with the same screen as above. So, do string catalogs not support packages at this time or am I doing something wrong? I was really hoping String Catalogs would work and save the day since Export Localizations also does not work for Swift packages that don't support macOS. 😔
7
0
3.7k
Dec ’23
Anyone having trouble getting "Export Localizations" to build complex projects?
Running on a Core i9 MacBook Pro with macOS 13.4 (22F66) and the Xcode 15 beta. Running "Export Localizations" seems to work fine with smaller projects, but in my larger project, it's not working unless I do a "Clean" first. The way my project is set up is that the main project depends on a few dynamic frameworks built from other Xcode projects which are incorporated into the main project and set as dependencies. What happens is that I'm getting the error "Unable to build project for localization string extraction. See the build logs for failure description." In the logs, I see that the Link (x86_64) step succeeds, but the Link (arm64) step fails, with a Could not find or use auto-linked framework 'MyFramework' message for each framework dependency that's in another Xcode project. This would suggest that the dependencies are being built only for x86_64. If I clean the project, the "Export Localizations" will then succeed, but if I do a regular build again, "Export Localizations" goes back to being broken. What I think is happening is that the "Export Localizations" workflow is using the same binaries as Debug builds, and leveraging any existing Debug builds that happen to exist instead of rebuilding them, but it's also trying to build for all supported architectures whereas a Debug build usually only builds the current one. This, of course, causes a failure to link to dependent libraries/frameworks, since they don't have binaries for the non-active architecture. Is there any way to turn off building for all architectures for the "Export Localizations" workflow? I don't think it's necessary just for localizations TBH.
5
1
1.1k
Apr ’24
Localization settings hidden if only 1 preffered language in iOS
I have added additional localizations into my iOS app. iOS is not available in those languages. So I did as it is suggested that you redirect customers to app settings view UIApplication.openSettingsURLString and there they can select another app language. Unfortunately they do not see language selection if they do not have set at least 2 Preferred languages in General -> Languages & Region. Also it does not matter what languages they have there. If my app does not support those then it still shows all localizations available. Is there somehow to force it? So it would be visible always? Since most people in my country have iPhones only in English but would like to use Apps in their native language.. Since they do not have 2 preferred languages they cant see the selection :(
7
7
3.3k
Mar ’24
After iOS 16.1 Widgets + Extensions get the local form device language not from the app
Before iOS 16.1 my app was woking good, if the user set the app language to other language than his device language, my app, widget + extensions all use this language... After iOS 16.1 if user set the app language to other language than his device language, my app works with this language but the widget + extensions works with the device language, not my app language... For Example:     @Environment(\.locale.languageCode) private var userLocal before iOS 16.1 userLocal would be the app local, after iOS 16.1 it return the device local Any idea why Apple did that? is this a bug? How to set the widget language to match my app language now? even set .environment(\.locale, dose not work when use Strings(table: because it's still get the bundle that match device language.
3
2
1.5k
Apr ’24
WeatherKit localization options
I am working on an app that pulls data from weatherKit, including the conditionCode property, the content of which is displayed to the user. I wish to localize the data pulled from weatherKit but when pulling data from: weatherkit.apple.com/api/v1/weather/de/{latitude}/{longitude} The conditionCode and other strings is in english. Same is true if the language parameter is set to es, ja or something else. Am I doing something wrong or is localization yet to be supported in weatherKit? I can't find any documentation on this.
4
0
2.8k
Jan ’24
Shanghainese/Sichuanese Dialect Support added to iOS 16 post
iOS16 lists supporting pinyin for Shanghainese and Sichuanese pharase. Aswell as now supporting a phonetic input method for Cantonese. Does anyone know how this function works, I have had no success in using Shanghai romanization or Sichuanese pinyin: Keyboard still produces only Standard Written Chinese (Mandarin) output. Further enhabling this under -Settings/General/Keyboard/Pinyin/Regional Dialect shows "Support for typing words with the selected dialect will download when connected to Wi-Fi" despite having been so. Any one know anything about this?
1
0
1.5k
Sep ’23
Call directory extension name not localised in settings iOS 15.3
I have two call directory extensions, each with InfoPlist.strings in en.lproj and nb.lproj directories. In these files I've defined CFBundleDisplayName for both locales. These names are displayed under Settings -> Phone -> Call Blocking & Identification. On iOS 12.2 the names are displayed correctly in both Norwegian and English. Testing on iOS 15.3 the English names are displayed even when device language is set to Norwegian. Worth noting: When updating the English versions of CFBundleDisplayName this is immediately reflected in Call Blocking & Identification page with Norwegian device language. As this feature requires a real device, I'm unable to test on iOS 13 and 14.
6
0
1.9k
Sep ’23
New iOS String Initializer can't get correct localized String for specific locale
I tried to build LocalizedKeyString using String's new Initializer. String(localized: "hello",locale: locale) When I change the language setting of the device, everything works as expected. However, when I try to get the string in a specific language using the specified Locale, I can only ever get the string in .current. String(localized: "hello",locale: Locale(identifier: "zh-cn"))     func getString(locale:Locale) -> String{          String(localized: "hello",locale: locale)     } If you change the display language of the project (or the language setting of the device), the text in Text is always displayed correctly. Text(getString(locale:.current)) However, the code in onAppear print(getString(locale:Locale(identifier: "zh-cn"))) It only displays the same content as Text, but not the specified Chinese. Is it my fault that the new Initializer The understanding is not correct, or the bug of String init(localized keyAndValue: String.LocalizationValue, table: String? = nil, bundle: Bundle? = nil, locale: Locale = .current, comment: StaticString? = nil) FB number: FB9675845
7
0
3.9k
Mar ’24
Localized language not getting deleted
I'm trying to remove a few languages which is present as the localized language in my app (under language section) in iTunes connect but when I try to remove it, it allows me to remove but when I try to save these changes Apple is prompting me an error message "You have one or more errors on this page. • An error has occurred. Try again later." Can anyone, please let me know how can I remove a localized language?
2
0
1.2k
Nov ’23
Wrong InfoPlist.strings file used by the app
I recently added a new language to my app and I have an issue regarding the localization. Configuration: I have the developmentRegion in "fr" and setup 2 localizations: "French: Development language" and "Danish" The goal is to have the application in Danish language if the preferred language is Danish and French otherwise. Issue: If French or Danish appear in my preferred languages, I have no problem. But if neither French nor Danish was set as preferred language (like only English), I have the app translation in French as expected but all strings regarding app permission like "NSLocationWhenInUseUsageDescription" in system modal alert are in Danish. Is like the localizable.strings file used is in the "fr.lproj" and the InfoPlist.strings is the "da.lproj" debug I verify I have all the strings files at the right repository. I have: fr.lproj -- Localizable.strings -- InfoPlist.strings da.lproj -- Localizable.strings -- InfoPlist.strings I verify the file architecture in the .app file: find ***.app -name "*.strings" ***.app/fr.lproj/InfoPlist.strings ***.app/da.lproj/InfoPlist.strings ***.app/fr.lproj/Localizable.strings ***.app/da.lproj/Localizable.strings Finally I print the Bundle.main.localizedInfoDictionary and I have values of the French file but the application show the Danish ones Thanks for the help.
4
0
1.7k
Sep ’23
Primary Language of Keyboard-Extension
I am writing a keyboard-extension, there are several buttons and these buttons have a text, therefor I am using localized strings. So the extension is always in the "correct" language. When opening the keyboard-extension with the "world"-button (pressing it long, so that the menu is shown) there is always a line below the name of the app showing "English". As far as I know this is the primary language, there is also one entry for "PrimaryLanguage" in the info.plist (NSExtension/NSExtensionAttributes, set to "en-US"). I tried to remove this entry, but after this the app does not start anymore. Is there a different way to remove this entry or is it possible to change it to the language of the localization?
2
0
2.5k
Nov ’23
Changing an App's Primary Language is broken in New App Store Connect
The new (2020) App Store Connect seems to have a bug which prevents changing the primary language of an app. I am familiar with the process, as I have changed the primary language of apps just prior to the 2020 App Store Connect update. To change the primary language, you must first manually add screenshots for the language that you want to be primary, and they must be approved for the App Store, you can normally then change the primary language for the app in the next update afterwards. While I now have the drop-down menu for the primary language, (in the past this indicates that the screenshot requirements are met) selecting the new language now produces an error: You must first provide all the required screenshots for each version in this language I am 100% certain that all screenshots are provided for the language on all platforms. I have been through this process for other apps shortly before the update. In my case, all required screenshots for iPhone, iPad and Apple Watch. None of the screenshots are being derived from another localization’s screenshots. However, I notice that the media manager in the new 2020 App Store Connect, doesn't allow you to un-check or disable deriving screenshots for platforms that you're not submitting screenshots for. In my case, my app is not an iMessage app, but the media manager is deriving iMessage screenshots (none) from the old primary language. I guess this is causing the bug, because my (0) iMessage screenshots are still being derived from the old primary language. I have just submitted a new update with dummy iMessage screenshots for each localization, however I suspect it will be rejected because it's not an iMessage app. Has anybody else managed to get around this issue, or is someone from support able to help? I contacted Apple Developer Support with a detailed explanation, but they simply replied with the normal instructions for changing the language, which does not address the actual issue I described.
6
1
5.4k
Oct ’23
Export For Localization with multiple targets
I have multiple targets in my app: targetA and targetB. Whenever i "Export For Localization", the .xliff generated will cointain translations for:1) Main.storyboard2) targetA/InfoPlist.strings3) targetB/InfoPlist.strings4) targetA/Localizable.strings5) targetB/Localizable.stringsI want to avoid multiple Localizable.strings, and multiple InfoPlist.strings. We do not need one localization per target.Any way i can force the "Export For Localization", to create a .xliff that only contains one Localizable.strings and one InfoPlist.strings?
9
0
6.8k
Sep ’23