How to add Language to Xcode project? - xcode

I want to translate my app to another language. I've allready read Internationalization and Localization Guide from Apple. Seems it's not working. A stuck when tried to add Russian language to Project. My actions:
Open Project settings.
Open Info pane.
Press plus under Localizations table
Choose Russian language
Press Finish in appearanced window
Result: no new language in Localizations table.
Project hasn't any .xib or .storyboard files. It has only Objective-C code without any forms.
Maybe I do all wrong. But I can't find good tutorial how do this in my case. So my case.
I have Xcode 10.1 Objective-C project for macOS. My app (plugin) must be translated to some languages. App hasn't any GUI. All text in NSString's. Now I need to add translations for it. What workflow to do this? I need something simple

Related

Adding localizable strings on xcode 10.1

I have a swift app where I now want to add translations for some of the strings used in the app using NSLocalizedString.
In order to do this, I added a file named Localizable.strings to the project and pressed the "localize" button in the file inspector in order to add multiple languages to it. However only english appeared in the localization list, and I seem to be unable to add more.
Having looked around at SO and just googling around, many of the articles on how to do this mention that I should add more languages to my project under build settings. But the only setting I can change under Localization is one named "Localized String Macro Names", and there is no option to add languages there. There is also no "Use Base Internationalization" marker to check.
I have also tried to click on my project, then Editor -> Add Localization, but there all the languages are greyed out and I am unable to chose any of them.
I therefore suppose that you are supposed to do this differently in the latest version of xcode (10.1 atm). Can anyone help me figure out how you are supposed to do it?
It's about the project settings. Take a look at the image:
Under the Localizations you add new languages. After you add the language here you select which files you want to localize.
// update
Click on the top right button shown in the screen below and select your project under the PROJECT tab.
You just selected the wrong settings. The picture that you attached is actually under TARGET settings -> Build Settings, rather than project settings.
See the picture below to select "project settings" under xcode 10:
Xcode 10, project settings

Cocoa: Localize Dialog

I'm currently translating my application (Mac OS X app) into another language. I've done almost all translations, but now I'm stuck on a pretty strange thing:
I have an additional window for the applications settings and translated the GUI elements the same way I did it for the main window. I imported the translations into my project which seemed to work fine because I can use the preview windows, switch the language of the assistant editor to German and see that the dialog will be localized correctly.
But as soon as I run my application (with "German" as language) and open the settings dialog the whole dialog is still in English (the base language).
The settings dialog's XIB file is located in the base.lproj folder and the corresponding .strings file is located in the de.lproj folder (which should be correct as the preview shows the correct translations).
I don't know what's going on and have no clue what might be the issue.
Does someone have any clue?
I'm using Xcode 6.1.1
I found the reason for this issue: Localizing the settings dialog forced Xcode to move it into the Base.lproj folder. But instead of moving the file Xcode just copied it into that folder - so the XIB file for the dialog existed twice and Cocoa used the old one (which was not localized).
After cleaning the build directory and deleting the derived data for the project the localization works fine now.

How to use Xcode to design interface iosopendev?

I have Xcode 4.4.1 installed on my system.
I recently installed iosopendev to develop apps for jailbreak. It integrated well, now I can see the option for iosopendev in new project menu.
My question is, how do I design the interface visually, like using storyboard for a jailbreak app, and which template should I select for that?
For starters, I selected the Cocoa Touch Library Template, but it didn't have a storyboard or xib.
I would highly appreciate it, if someone could elaborate the steps and method for designing apps for jailbreak visually using Xcode.
P.S.- I have searched a lot on the internet and didn't find anything useful and hence as a last resort posted a question here.
Two ways you can create UI apps in Xcode that can be used with iOSOpenDev:
(1) Select an Xcode template and refer to https://github.com/kokoabim/iOSOpenDev/wiki/Convert-to-iOSOpenDev-Project to convert it to iOSOpenDev.
..Or..
(2) Select an iOSOpenDev template (that produces a bundle binary), add XIB file(s), create a Copy Bundle Resources Build Phase and drag-and-drop that new Build Phase so that it is above the Run Script Build Phase that runs the iosod script.

How to add localization language to Xcode 4.4?

In reference to this guide:
How to localize my app with Xcode 4?
I noticed that under Localization, my Xcode 4.4 shows no [+] button:
How can I add languages to the Localization list?
Note: I'm not using IB. I purely need a localized strings file with translated strings for a game.
My workaround so far: I created the de.lproj folders manually, copied the strings file into de.lproj, added it to Xcode and Xcode did recognize the file as german. Xcode also added German to the Localization list. I'm wondering if there is an easier way to do this (from within Xcode) instead of copying & adding the files manually?
Select your project from the project navigator to open the project editor. Select your project from the left side of the project editor. Click the Info button at the top of the editor. You should see a list of localizations along with a button to add a localization. Click the Add button and choose a language. A sheet will open that lets you choose what files to localize.

xcode doesn't recognize localization in Info.plist

I am using Xcode 4.4.
As you may all know, there is an easy option to localize resource files in Xcode. You can also internationalize your plist Files, which is my approach.
But since 4.4 it doesn't seem to work properly anymore.
All you have to do is the following:
In <project>-Info.plist file add key "Localization" which adds a subarray where you add your country codes as items
now you can localize you resource file (like Localizable.strings) i.e. like so: followed by a modal screen where you're able to choose the languages defined in plist file
Enter! The resource file now lives in <country identifier>.lproj folder.
In Xcode 4.4 you cannot choose your language, defined in plist file. Only English.
I tried everything. Don't want to localize manually.
Also in Xcode versions below 4.4 it was possible to add new languages with a '+'-button. It is not possible:
Look at this:
Any suggestions. Or do I do it just the wrong way?
Here is how you localize your recources in Xcode 4.4+ :
Click on your project (navigator)
On 'Info' tab under your project you'll see the 'Localizations' section
Click on + to add a language
Choose the files you want to localize in the sheet that will be displayed
Now Xcode will automatically create and put your files under the respective language folders.
Finally if you want to localize other sources (such as image files), click on your file, bring the file inspector pane and click 'Make Localized...' button under 'Localization' section. Xcode will fire up another sheet with the available languages, choose the language and you're ready. I hope that this makes sense.
The question is, too, how to localize multiple Info.plist files for multiple targets.
This is done very easily. Just add the languages you want your localization in to the projectile, as described above.
Then you click your several Info.plist Files, each for each target.
Open up the Utilities sidebar
Click "Make localized"
Then choose between the in the project-file setup languages and you're done.

Resources