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!
Localization
RSS for tagLocalization is the process of adapting and translating your app to multiple languages.
Posts under Localization tag
122 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
Is it possible to merge or split a string catalog? It doesn't seem possible now.
The workaround i use now is eidting the xcstrings file in TextEdit.
I migrated to String Catalog in my app.
That worked fine, and everything is OK in the Simulator and even on a real device.
However, After I deployed the App and it became available in the AppStore, I started receiving Feedback from some users. Seems my app is no longer doing localization. It always presents itself in its development language.
Has anyone else experienced this?
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.
Hello,
Upon registration to be able to localise the App for the users I am requesting the countryCode:
(Locale.current as NSLocale).object(forKey: NSLocale.Key.countryCode) as? String
Most of the values are the one expected ("US", "GB", "DE", ...), however in some cases I have numeric country codes like "419" or "241".
I wanted to know if this was expected and how I can make them fallback to the regular country code that are none numeric.
Thank you
I have an app that supports English and Arabic. If a German user has Arabic in the languages for their iPhone, the app is switching to Arabic, since that language is one of their languages.
How do I get it to only use the top most language (their most preferred language) they have set? So a German user that does not have English in their languages or maybe has it below Arabic, will still get English as their 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?
I am using Xcode 15 and working on a localised app. I use the new String Catalogs feature which works great for my app. In my app I created some local package like Apple has done it in the Backyard Birds example. However the translations I did in the package's String Catalog won’t be used in the app. What am I doing wrong?
I have English as the base language but I also support English (UK) which defines a few UK specific localizations but should fall back to English for everything else.
The way I have it now, all my fallback strings are in "New" state in the UK localization, ie they don't have a UK specific string. This actually works, but UK completion is at 5% and I can't find a way to tell it that the rest are OK to be taken from the base language. By keeping a lot of "New" strings, the tool won't be helping me when I add more strings to the base language.
Marking those as Reviewed creates a blank string localization which is obviously not what I need.
BTW if marking as reviewed would help here, it would be a pain because it has to be done one by one, I can't multi select.
Hi,
is there any possibility to localize my Swift Playgrounds APP?
In the Build meta data it is always only English, and the "traditional" localization process doesn't work in Swift Playgrounds on iPad or in Xcode on Mac.
Xcode 15 beta 6 :
Xcode is looking for "${applicationName}" in the strings file keys instead of the value only.
(it was working on Xcode 14)
error : Invalid Utterance. Every App Shortcut utterance should have one '${applicationName}' in it.
My app does not support localization. I only have en.lproj and Base.lproj folders (and the Base ones contain only English text.)
However, when I run the app in another language (e.g., Arabic) and call String(format: informErrorFormat, arguments: [3]) for example, the text is in English but the number displays in Arabic. What is the best way to fix this?
Hi,
My game supports more than 10 languages. I used the Unity engine to build my game and there is a Unity plugin which I used to add all the localizations. But in the App Store, only English is displayed under Language Information. I added all supported languages in Xcode:
What else should I do?
I have an App with multiple string catalogs.
I mistyped the name of a table in one of my
String(localized: "Some English Text", table "nonExistingTable") instances.
I did not receive a compile-time warning telling me the table was missing and my application defaulted to the English text instead. Is this expected behaviour or a bug?
I’m exploring the new Xcode 15 string catalog feature.
I see that for every sentence there is a “screenshots” field in the Xcode inspector (see image). How can we populate this field?
Thank you
If I create a swift package with 1000 strings in the Localizable.strings file for English, but I only end up using 10 of the strings in my app, will the other 990 strings be optimized away?
I am pretty sure that Localizable.strings files for languages not supported by the app are excluded, but I wanted to confirm whether Xcode is capable of detecting unused strings.
Why is the custom localized string macro name only allowed for Objective C and C code? I have a wrapper class for localization which is a Swift function. I'm unable to get the strings i pass to it localized. Is there any way to get it working other than writing an objective C class and adding it to the bridging header?
In stringsdict it was possible to define a format separately from the translation so you could do something like "n_days" which you could pass in an integer and it would return you only "Day" or "Days" without the actual value in it. And it's work great.
But now with the strings catalog it seems like the format specifier HAS to be in the value, otherwise it's not recognized. Is there now no way to pluralize anything without having the actual value inside the translation?
Cannot infer format specifier for string group because no numerical specifiers were found (en: %d.n_hours)
Hello everyone,
I am currently working on a project that requires me to programmatically manage keyboard layouts on both iOS and macOS devices. I'm looking for a comprehensive list of KeyboardLayout ID values for all the native keyboard layouts available in both iOS and macOS. While I can extract some of this information from the /System/Library/Keyboard Layouts/ directory on macOS, I cannot extract all without adding every keyboard layout active, having a complete and pre-compiled list would be immensely helpful.
Does anyone here have such a list or know where I might find one? Any guidance on this matter would be greatly appreciated.
Thank you in advance for your assistance!
JJ
I recently made an update to my game and localised the app in Xcode using the steps described here: https://developer.apple.com/localization/
I also localised my app store page into a few languages, the same as my xcode project's plist localisations. (using the technique shown here: https://developer.apple.com/documentation/xcode/adding-support-for-languages-and-regions )
In the Appstore however, my app is only listed as "English", no other languages are listed in the Languages section.
I'm wondering what setting I may have missed.
My project has localised .lproj for the additional languages, so I'm not sure why they are not working.
My localised .plist files for each language have the following setting:
CFBundleDevelopmentRegion
en
Should this be something other than "en"? For example, in /ja.lproj/info.plist should CFBundleDevelopmentRegion be "ja"?
Would that make a difference?