when I use the NSLocalizedString to localize the app, I create a new strings named Localizable. It worked firstly through the localize and adding the languages.
However, when I delete the Localizable.strings and recreate the strings, there is a problem that can not localize, system can not find the strings and can add language such as zh_hans, english and so on.
See below image for more detail.
Related
I am trying to add localization on my project. Right now I have my main project, and all the text in the Main Storyboard and the .swift classes is in language Norwegian. I have another project where everything is in English, but I want to only use one project with both languages, so I can have one app only on the app store. I have about 20 different classes, and some classes contain multiple arrays with over 400 strings each. How exactly do I add English language to my existing project?
According to Apple guidelines, the default language of your app will be based on the user device default language settings.
To add localization to your xcode project, start by the adding the language you want from Project navigator -> Info -> Localizations tab and select the language you want to add. After selecting the language, a popup will appear to select the resource that you want to include in your localization:
You will notice that you will have a new .string file under your selected resource (for example, Main.storyboard) where you can do all the translation you want.
There are other topics like localizing strings from your code (for example, having a .string and an extension to your String) or image localization.
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
I'm trying to create a localization file for strings. I added a file named Localizable.strings in project. But localization window does not appear in other languages.I can only choose some languages. What do I need to be able to select other languages. (Ex: Turkish,Polish...)
You can add a lot of languages in project properties. Look at the picture. Hope this help.
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.
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.