0 localized files seen in xcode for native development language - ios

I'm working on a project where I need to add localize file of another language in xcode.
But when I try to add new language, it does not show me list of the base storyboards. Like given below
Also I'm seeing that 0 files localized for english - development language.
Anyone having any idea about it ?

you should localize files you need, then those files will be present in list of localizable resources

Related

Xcode 10 - Unable to Localize UINavigation Controller Title

I have an app that I want to translate to Spanish. The app is very simple and uses a basic UINavigation Controller. The title is set in the main story board:
To add Spanish I did the followings:
Added Spanish in the project Localizations
My first question to you all is why is showing 4 files in English and 3 Files in Spanish, when I actually have 2 files for English and 2 Files for Spanish
I enabled location to the view controller
I added string file to the project as well. This is for labels and dynamic text within the views, and this is working as expected.
Edited the Main.strings (Spanish)
When running the app, I edited the scheme, and set the application Language to Spanish.
When the app launched and got to the main screen, I still see Welcome instead of "Bienvenidos" What am I missing?
Other things you should know, when adding localization I enabled and disabled this feature a few times for the storyboard trying different options. Also, when testing the app, I change the settings language to Spanish, I deleted and installed the app multiple times as well.
I'm using Xcode 10.1, Project Format is Xcode 9.3-compatible, iOS deployment target is 12.1
Hope someone can help.
Hope this helps someone else. With Xcode 10 the recommended way to do any localization is by selecting your project and perform an export for localization, just go to Editor > Export For Localization
Once you exported the project, make any changes to the .xliff files, images, etc.
In the .xliff file, each translation should have a <source>, <target> and <note> tag. In my case, many tags are missing. I manually added them, did the translation and import the translation into my project.
To import the localization just select your project and go to Editor > Import Localizations. Now everything should work as expected.
This video from WWDC helped me resolve my issue
https://developer.apple.com/videos/play/wwdc2018/404/
Hope this helps
For your first question, you probably have also localized your LaunchScreen.storyboard file. So you should have 3 localized files in total, except that for your Main.storyboard you have checked all three checkboxes (Base, English and Spanish) and since English is your development language, it counts for two.
As for your second question, if you're running in the simulator, just editing the scheme should be fine. Since you told that you enabled and disabled localization for your project something might have broken with Xcode. I've been there as well when I tried to remove a localization. Try to clean you project (Product -> Clean Build Folder) before running the app or even start the project from the scratch (if possible) without this adding/removing flow. Hope this helps.

Adding localized files to a new IOS 7 app

I'm starting to studying app localizations and I'm stuck at the very beginning.. I've created a new project called LocalizedStrings2:
I click the plus button to add Italian Language and it offers me to localize 2 InfoPlist.strings files:
Is this correct? BTW, I add the italian language:
Then I've wrote the following code in the English InfoPlist.strings file:
"ERR_MSG" = "Error Message!"
The following line has been entered in the Italian version of the file:
"ERR_MSG" = "Messaggio d'errore!"
When I compile I receive the following error (I have the same error even if the two files are empty:
Any hint or good reference for up-to-date How To Localize my IOS App documentation?
Thanks in advance for any help!
Gianni
I was facing the same problem for many days. Then I figured it out…
Just put a ; at the end of the line and it's fixed! :D
Recommendation
I don't think you should have two English references to your file in the UI. Change one to italian and verify that the files are in the proper location in your finder folder.
I would then consider removing the file references from the project and re-add them. I've noticed some peculiar behaviors when using localization for older versions of the SDK in Xcode 5+. BTW - If you are planning to support a deployment target of iOS5 you will need to remove the Base localization setting and just create the localization folders manually (inside the project folder in Finder). After you re-add the files I would check the Build Phases > Copy Bundle Resources > search for plist to verify that ProjectName/(localization).lproj is found.
NOTE
Please check out the updated documentation and let me know if that is a sufficient answer.
Internationalizing Your App
I guess the second InfoPlist.strings file derives trom your tests.
Check out the "Supporting Files-Folder" in your apps test target.

Xcode 4.4 changes to localization - how do I NOT localize main storyboard?

I'm localizing an app for the first time, and only need to localize my "Localizable.strings" file. To set that up I created the file, then selected it and pressed the "Make localized..." button and it let me add an English localization (I haven't added any other languages yet).
To my surprise, with Xcode 4.4, doing that also automatically localized these files, moving them into the "en.lproj" folder:
InfoPlist.strings
MainStoryboard.storyboard
I don't need or want to localize the storyboard file, as there's nothing in it that's language based... and as far as I know, I don't need to localize InfoPlist.strings either (unless I decide to localize the app name?).
So, how do I unlocalize a file?
I see there's an option for "Use base internationalization" which from my understanding would use a base main storyboard rather than localizing it. That sounds like what I need, but according to the Xcode 4.4 release notes that won't work on iOS projects:
The Use Base Internationalization setting in the project editor works
only on Mac products for deployment on OS X v.10.8 and later. Xcode
must also be running on OS X v.10.8 or later. This setting is not
supported on iOS projects. 11712855
https://developer.apple.com/library/mac/#releasenotes/DeveloperTools/RN-Xcode/_index.html
Thanks for any help.
If you select a file and look at the info for that file. Under the "General" tap there is a section for localization with a +/- for the various languages. Just remove all the languages from there and it will no longer be localized.

iOS Localization how to add an existed folder with localization files

How to add an existed folder with localization files.
I have an existed project with english as base, then have en.lproj.
And I have other localization files in file system names with ja.lproj.
However, If i directly import folder ja.lproj to xcode, seems not work, in project tab, it shows 0 files localized, and while start app, it will crash.
I know it may work, I choose one english version file, add plus in file inspector, then will add another lang version, however, it's not convenient, and new file will locate in en.lproj sub-folder, it's strange.
anybody can help me ?
Thanks a lot!
I don't think you would be able to do that with folders. Although you can do that with files. Just define different versions of the same file for different languages. Like this:

Localization for new Files in older Project breaks App

Good evening
I want to add a new year, a new volume as plist-file to my existing app. The app is localized for 4 languages, so the new file has to be localized also. The languages were "English", "German", "French" and "Italian".
But when I do this, Xcode creates a directory "de.lproj" next to the existing "German.lproj", same behaviour for French and Italian, but not English. The older localized files are now in a directory "German.lproj", the newly generated plist in a folder called "de.lproj".
Then the app will no longer recognize the localized strings, exept the english version.
How can I add a new localized file to this project without breaking the rest?
Regards
You should use Localization Suite to manage your translations. This way, you can let loc-suite to scan changes in your original .plist file and tell you which ones are translated and which ones are not. Loc-suite can also update your localized .plist file and remove dead entries.
This question is slightly off topic at stackoverflow though.
Finally I solved the problem like this:
Make a backup of each localized file (plist and strings files) in the Finder and collect them in a folder for each language.
In Xcode, remove every localization for these files so that the only remaining language is English.
In Finder, delete the old lproj directories in the project folder except English.lproj.
In Xcode, add the formerly deleted localizations for each file. Copy the contents of the files into the newly generated localized files.
Maybe this can help somebody.

Resources