Tag: localization

Can I localize a UIDatePicker?

I’m trying to localize a UIDatePicker. Apple’s docs say that it should autodetect the current locale, yet the language stays the same, no matter what language I select. What do I have to do?

iOS game Localization with String Format

I want to localize strings with numbers inside a sentence. I dont use iOS’s Localizable.strings file since it’s tedious and error prone and I may decide to rephrase words later on. Here is what I did: #define sf_buy_bombs @”Are you sure you want to buy %i bombs for $%i? ” where ‘sf’ suffix means ‘string […]

where in an XCode project does it set “InfoPlist.strings” as the filename to use for locationalization?

where in an XCode project does it set “InfoPlist.strings” as the filename to use for locationalization? Just trying to understand how XCode pulls things together here. For example to set the app name specifically I can change this in “AppName_plist-Info.plist”, however if I go localization it seems it then has to be set via the […]

Use genstrings with a folder-structured project for localization

In an iOS Project with folders containing *.m files, similar to packages, one will have to run genstrings -o en.lproj *.m for each folder and match the relative en.lproj path. Is there a command that will do the drill down from the root folder?

xcode crash on adding localization for Info.plist with Base localization

I am using Base localization with Xcode 7.0.1 in a swift ios project. When trying to add a localized version of Info.plist, Xcode crashes reproducibly. The crash report reads: Process: Xcode [8668] Path: /Applications/Xcode.app/Contents/MacOS/Xcode Identifier: com.apple.dt.Xcode Version: 7.0.1 (8228) Build Info: IDEFrameworks-8228000000000000~5 Code Type: X86-64 (Native) Parent Process: ??? [1] Responsible: Xcode [8668] User ID: […]

iOS Localization Doesn't Work with More Than 63 Files

On iOS 9, the localization is not working well when more than 63 localization files are added. If you have minus than 63 files, the translation can work correctly, but when more than 63 files are added the Xcode doesn’t call the correct language file, always calling base. On my GitHub example project (https://github.com/munhra/iOSLocalizationExample), there […]

Localization failed to read a strings file (Xcode 6.3.2)

I can’t export for localization, I just get a “Localization failed to read a strings file” error. The system log says: 2015-06-07 01:41:48,305 Xcode[1914]: [MT] DVTAssertions: Warning in /SourceCache/IDEFrameworks/IDEFrameworks-7718/IDEFoundation/Localization/IDELocalizationWork.m:434 Details: Failed to read strings file “/var/folders/vh/z7jrdtc16mv_ml4rdf3c_yf40000gn/T/Xcode3SourceStringsAdaptor-8B1BF14F-E8BF-4354-9FB6-BFF843BD6623/Localizable.strings”, underlying error: The data couldn’t be read because it isn’t in the correct format. Object: <IDELocalizationWork> Method: +readStringsWorkForContext: Thread: […]

Localized file paths hard coded in XCode 4 – disappear when project moved to new folder

We localized a project recently into to 15 languages using Xcode but I noticed when I took the project home the paths to some of the localized files were all hardcoded to the full path of my work mac. We only localized two files: InfoPlist.strings Localizable.strings We used Xcode to do the localisation as follows. […]

xcode don't localize specific strings

In my storyboard files, I have multiple strings, which I don’t need to localize, their text filled with values from server or code at run-time (author’s name, object name, etc.); with initial text filled with something like: ‘Label’, ‘Author Name’. (I want to keep these original values in storyboards, for previewing interface.) I am using […]

Localizing system generated privacy alert message iOS UIAlertView Xcode

I have an app in development using Xcode Swift 1.1 and am testing it using iOS 7.1 and iOS 8.1 simulators. The app allows users to access their photos library, but before they can, iOS displays the Privacy alert message title asking for the user’s permission in English language – “App Name” Would Like to […]