Xcode-How i can add other language on localization window - ios

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.

Related

Xcode localization: Base concept without redundancy

I am a little confused about the implementation of localization in Xcode. I know that I can provide as many languages as I want by creating the appropriate XY.Iproj folders and inserting the .strings and Localizable.strings files into them. This all happens automatically with Xcode.
Unfortunately I have problems understanding the Base concept. As I understood it so far, the development language is to be used there. In my case this is English, so should I write in the storyboard and XIB files as text directly in English? For example the headline (a label) of the settings page with the content "Settings"?
But why do I have also the .strings file with the translation into English? That would be redundant, because I have already entered English text directly in the Base file and the .strings file contains the same text again.
Or should the storyboard and XIB files only have identifiers like "settings_page_headline" as content for labels? But that's nonsense, because these labels are good for nothing...
Or can I completely delete the .strings for the English translation if I have already inserted the English content in the storyboard and XIB files?
I hope you can enlighten me a bit. Of course I have read the documentation of Apple, there my problem of understanding is not discussed as much as I need to understand it.
Main.storyboard (Base) and Main.strings (English) contain the same content:
Content of the Main.storyboard (Base):
Content of the Main.strings (English):
"tos-eB-aJc.title" = "Send Feedback";
"S56-oM-eis.title" = "Rate this App";
From Apple documentation:
Xcode creates a Base.lproj folder in your project folder and adds to it the resource files you select. Xcode creates a language folder for the development language but only adds resources that need translation to the folder. For example, if you select English as the development language, Xcode inserts the resource file in the Base.lproj project folder but not the en.lproj folder because the resource is already in English.
link: InternationalizingYourUserInterface
As I understand it, this was done to optimize the import of localization files. Also you can not localize some .xib . If you want to understand how, by what logic and in what order the localization files are loading, read this document from Apple: LocalizingYourApp

Xcode 10 localization

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.

What are the steps involved in localization in Xcode?

I am trying to localize my application with out storyBoard in my native language urdu (Pakistan). I watch many videos and links.
I am trying follwing steps:
First Add the language
then make a new String File named Localizable.string
Go to View > Utilities > Show File Inspector (⌥⌘1)
Locate Localization section and select "Localize..."
Choose base language (I chose English), and click the required language and then click the localize.
After that go to "Editscheme" select the Application language, there is no option to select the urdu(Pakistan) language.
Some one says go to project.pbxpro file and make changes to it. I tried to make changes to the file but I can't succeed.
Totally confused. What can I do?
I suggest you to create the Localizable file first, then add the language. This is because you don't have a storyboard, Xcode might not know what you want to localize when you try to add the language in the project settings.
So,
create the Localizable.strings file first, press "Localize" and select "Base"
Go to project settings' Localization section:
Select the language:
Now select Localizable.strings file to localize (in the picture I have other files as well, but you should only have Localizable.strings)
Now you should have two Localizable.strings files, one says "Base", one says "Urdu (Pakistan)". Write your localizations in the corresponding files!

0 localized files seen in xcode for native development language

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

Why can't I add localization to my iOS app?

I'm trying to add a localization. I've read all those localization/internationalization guides from Apple and raywenderlich.com. I've marked all my code with NSLocalizedString macro, I've used genstrings to create Localizable.strings. But somehow I'm missing some important step.
When I try to add localization to my Localizable.strings I'm somehow restricted to English only.
When I try to add localization to project via "Editor"->"Add Localization" all language options are disabled.
Does anybody have any thoughts as to why am I restricted to English only? What have I missed?
I've tried to add localization to other projects with the same result. :(
You need to first add your localizations to your project. Click on the project file, ensure that the project, not the target, is selected in the middle pane and then choose the "Info" screen. There's a area called "Localizations" where you can add languages. You should then be able to localize your resources.
Another possible issue is that you are not selecting appropriately the project, which leads to all languages in the Add localization list being disabled.
By default the target may be selected, make sure you select the project instead. Then you can use the Add localization normally.
Something which kept me busy for too long. I looked over the language I needed (Swedish) in the first list and took the one from the "Other" list. Well my phone or emulator didn't change at all to Swedish. But when I took Swedish from the first list it got nicely updated when changing the language settings.
With Xcode 6, you can do it via Project Settings.

Resources