How to localize iOS settings bundle? - ios

I added English string to title, what about other languages? Also how to auto generate Root strings files for current titles?

fount out..
Apple/Xcode developers just didn't really implement anything in Xcode to automate this process
we have to manually create the next structure using Finder:
Settings.bundle:
Root.plist
en.lproj:
Root.strings
ru.lproj:
Root.strings
en.lproj, ru.lproj folders
Root.strings - file
p.s. you won't see Root.strings in Xcode, you need to find it in Finder and edit it using TextEdit

Related

How to add a localization to a settings.bundle?

My app supports two languages. When I add a settings-bundle, it´s only in english. In Xcode 6.1 I found no way to add a localization to Settings.bundle. Did I miss something?
Nevertheless I found a working solution.
1) open Settings.bundle package
2) create new folder de.lproj (dont´t duplicate en.lproj - Finder don´t likes this)
3) copy Root.strings from en.lproj-folder to de.lproj-folder
4) now you can edit the new language in Xcode
It seems not working in Simulator. I am using Xcode 8.2.1.
OK. I find out the issue. In my Xcode project, the file Root.plist in Settings.bundle, there is one item missing: Strings Filename. I added this entry and set its value to Root, which is for language localization. With this missing item added, my app settings are working as expected in Simulator!
See my blog on this for more information.

how to fix localization on xcode 5 after i delete all language

I took a mistake. I deleted all localizations.
But I would like to use localizations. So I tried to add. But I couldn't.
When I added localization, Show following image.
When I deleted all
Tried to add some language
After adding
But 0 Files created.
How should I fix it..Let me know please.
You should add Localizable.strings once again and localize the files you need to be localized (including Localizable.strings) using File inspector
Just Go to
File -> Add File to "Project" and then add "Main.storyboard" and "InfoPlist.strings"

Resource files are not displaying in Localization

Only one Resource file is displaying When i'm adding Localizable.strings file for any language. My steps are,
Selected My main app's project file in xcode and found info option is there
in info - Localization - + option
Note: there is only one resource file (InfoPlist.strings) is available to add Language.
3- then Finish, but there is no Localizable.strings file is displaying in xcode but there is InfoPlist.strings file displaying.
But if i do these same steps in sample app which is working fine , I can able to select Multiple resource files And also I can see many Localizable.strings & InfoPlist.strings
in xcode.
Like:
Localizable.strings (English)
Localizable.strings (Spanish)
InfoPlist.Strings (English)
InfoPlist.Strings (Spanish)
Can anyone please tell me the solution to add multiple resource files when localizing any language?
If you want to make your app to support multiple languages, then you'll need to add .strings files to your project, make sure that you should name it "Localizable.strings" only, and need to put in particular language folder,
See this question and my answer there,
Localized filename should always be named Localizable.strings, and that file is within the particular language folder, for English, en.lproj and for French fr.lproj like wise.
Localizable.strings file should be inside the Base.lproj folder.

iOS - error during archiving noting UAPushLocalization.bundle/en.lproj/Localizable.strings

I created a new set of controllers and when I tried to archive the new code, I got this error which happened when the archiving was going over those controllers:
error: open /Users/owner12/Library/Developer/Xcode/DerivedData/Marketing-eusiyfrkjsbjfxdgpauubwhvpazb/Build/Intermediates/ArchiveIntermediates/Marketing/InstallationBuildProductsLocation/Applications/Marketing.app/UAPushLocalization.bundle/en.lproj/Localizable.strings: No such file or directory
I understand that it is talking about the push-enabling library. And something about some localization setting.
But I have no idea how to fix this.
Would anyone be able to suggest how to fix this?
And here is the screen shot of this reference highlighted in red in the Build Phases --> Copy Bundle Resources list.
Thanks,
Alex
Xcode has some weird issues with localization from time to time. I would recommend you to copy all the text in the EN localization file (expand the localization strings file and select the english one "en"). Paste it somewhere, right click the file, show in finder, delete, select the localizations file, uncheck localization for english, clean your project, select the localization file, check the english one (a new file will be created) and paste your strings here.
Also make sure there are no typos in it.

How do you add localization to the Settings bundle under source code control

I am trying to localize my Settings.bundle. There does not appear to be anything in Xcode 4 that allows you to add localization to the Settings.bundle similar to localizing a xib file. So I used finder to navigate to the Settings.bundle and copied the en.lproj directory to create directories in the bundle called fr.lproj and de.lproj. From there, you can modify the strings file to localize the titles in the Root.plist.
But the problem is that the new directory is not under source code control. If I try to add the directory to source code control, I get the following error: The operation could not be performed because the selection is invalid.
How can I resolve this problem and get the new settings.bundle directory under source code control?
Correct strings file format is:
"Title" = "title in correct language";
Pay attention "Title" from Root.Plist NOT "Identifier"
What you are doing is right. I can't explain why you are unable to add your new subfolders/files to source control. I have the exact same structure in an iOS project of mine and these files are under source control like all the others. I don't recall having difficulties adding them.
Have you tried using git commands directly to add them? The integration in XCode is great but in my experience there are time when you do have to use the command line for git.

Resources