Correct way to remove ONE localization - iphone

Seeing as the sv_SE localization doesn't take effect on the iPhone Simulator, but sv does (with the same language settings set to Swedish (language AND region), I would now like to remove the sv_SE localization to keep things proper.
What's the correct way to do this?
Do I really have to Remove All Localizations and re-do the translation work for the XIBs, as there seems no other way to do it in the Info window?
Mark localization in resources and delete? Delete folder/.lproj? Which is correct?

Xcode 3.2: expand localizable file subtree in left pane (files & groups). Then delete the unwanted localization. You probably want to click "Also move to trash" button.
Xcode 4: select the file, show utilities sidebar (the right one), pick the "show file inspector" button. There is a section with localizations. Select the unwanted one, click minus (-) button. Confirm. Or do it like in Xcode 3.2 deleting the localization from the project navigator. , it's up to you.
Xcode 5: works like Xcode 4.
If you remove all localizations (by mistake for instance) you can add the lproj folders to the project. You don't need to make one by one localizable again.
Tip: better you commit your work, experiment, if your changes doesn't work checkout the previous version and try again.

Related

Switching to Base Internationaliztion

My app is currently localized for English and Japanese, with seperate storyboards for each. I want to switch to base localization so that I only have to maintain a single storyboard. I've checked the "Use Base Internationalization" box in the project's info tab and chosen the English iPhone and iPad storyboards for the base.
I assume I should delete the Japanese iPhone and iPad storyboards I had previously used, but I don't see an option to delete them when right-clicking on their files in the file inspector. Should I delete these old storyboards, and, if so, how?
** Edit **
Changing the 'Main Interface' shown in the screenshot doesn't allow me to delete the Japanese storyboard. It's hard to tell which storyboard to select in the dropdown because its width is more narrow than the storyboard names, but that's a separate issue.
This tutorial drives you through the process step-by-step. This is how it worked for me:
Remove all localizations and leave only the base.
Ensure that the localized files were moved from the project directory (in Finder)
Add the localizations one-by-one
The localized strings are extracted from the storyboard only when the localization is created. The Tutorial above provides a script that can help you keeping the localized files up to date if the storyboard is changed.
In your case, you will have to merge the existing translations into the new files but I suppose it is not a huge deal compared to the gain with using a single file.
For reference, the process is described in this official tutorial too: http://developer.apple.com/library/ios/referencelibrary/GettingStarted/RoadMapiOS/chapters/InternationalizeYourApp/InternationalizeYourApp/InternationalizeYourApp.html
After cleaning and reloading, I was able to remove the Japanese storyboards by clicking on the - in the project settings:

Xcode Base internationalization doesn't work

I'm trying to localize my app.
I noticed that if I add a language every localized file become doubled.
In this way it's impossible to maintain code or storyboard so I learnt that I need Base internationalization.
The problem is that when I select that checkbox in xcode project setting it shows a window without nothing to select, does anyone know how to fix this?
Here's a screenshot
First, you need to go to your storyboard file, open the bar on the right side, and go to Show the File Inspector, the furthest tab to the left. Then, scroll down and click localize. After this, when you check Use Base Localization, you should see the storyboard appear.
This could happen if Base Internationalization was active before then disabled and files deleted manually.
Create Base.lproj folder in your project folder using the finder.
Move your main story board to it also using the finder.
fix the reference to it from Xcode.
remove app. from device, clean & build your project.
All will be back to normal.

View changed files in Xcode 4.2 SCM features

How can I see all the files that have been modified in Xcode 4.2 like in Xcode 3.2.6 there was a separate SCM view which shows all the files that have been changed in a single place. In Xcode 4.2 I can see the modified files scattered over my project pane. I want to specifically check in some files and want to see all the modified files at a single place.
Bottom left, click on the thing that looks like a little box, next to the clock.
In the bottom left hand corner there's an icon for "show items with source control status". It will filter the file list to files that have a status (modified, added).

Files missing in XCode 4 Project Navigator after archiving

I'm currently trying to create version 1.1 of a project I created in XCode 4, but after archiving the files do not appear in the Project Navigator. My initial thought was that I had to clone my repository (git) and thus create a new version in which I could see the
files, but the clone is also missing the files.
I can access the files from the top bar, but that's not really a desirable solution when
working with a big project. The case is the same for another project that I have archived
so I suspect it is supposed to be a feature of XCode 4.
What am I missing here?
(I'm just combining your "nevermind, I found it" comments into an answer, to maintain the SO style, so this question doesn't pop up as needing an answer.)
Check that you're not filtering file names (left column, bottom.)
Also make sure you haven't pressed one of the "show only files with..." toggle buttons (same location, near the search entry.)
Note that these buttons are toggles
Yes. I had to hit the X button with the icon that was blue at the bottom. This corrected my issue for XCODE Version 6.1. Thanks.

Localization of Default.png is not working

I wonder if anyone has encountered the same problem and how they solve it.
I want to localize Default.png so I do the following steps which from what I understand should be the correct way (please correct me if I'm wrong).
Select Default.png in xcode
Command-I to Get Info
Click on Make File Localizable
Go back to General Tab (why Apple, why?)
Click on Add Localization
Enter es for Spanish according to this:
In finder I replace the Default.png in the es.lproj folder
I have tried in both the simulator and on an iPhone with changing the language between English and Spanish, but I only get the original file. Other localizations like app name and strings works just fine, but not this one...
I'm on xcode 3.2.3
Thanks
I'd thought I'd add the answer for localizing Launch.xib.
Create InfoPlist.strings file. (File,New,Resource,Strings)
Localize it and select your languages
For e.g. the Spanish version, add your launch screen key and name for the Spanish version of your Launch screen
"UILaunchStoryboardName" = "Launch_es";
Copy your existing Launch.xib to Launch_es.xib, and change the text and/or images to the Spanish translations or Spanish-named images.
I got this solution from Developers Forum (credit to Sascha Paulus, thanks Sascha!).
I had a similar problem in another project with localization, but the solution worked for both issues.
Here we go:
Delete App from Simulator (just to be sure)
Delete all versions of the localized Default.png (in XCode & on Disc)
Select Build > Clean All Targets
If not done yet, make the Localizion Directories (e.g. es.lproj, de.lproj)
Copy the localized Default.png in the appropriate Localizion Directory
Go To XCode > Right Mouse Click on Resources > Add > Existing File ...
Select the localized Default.png in the Localizion Directory
Don't forget to mark "Copy items into destination group's folder...." > Add
Repeat it with every localized Default.png
I think the trick is to delete the file you have a problem with, clean all and then add it again. If you don't have any localization there is no need to create a specific folder.
Give it a try, worked for me.
I have had the same problem. I have solved it with this:
In the Simulator, menu "simulator iOs", option "restart content and settings".
In Xcode, menu "Build", option "Clean All Targets"
And when I have selected the button "Build and run" it has worked.
Just to add that on a latest 4.3.3 every attempt to remove and re-add the files, and the clean all, nothing worked, but what solved everything was the remove-app-from-device-and-simulator and reinstall. Now every image and xib are translated correctly.