Best way to make an iPhone application multi-lingual - iphone

Can anyone tell me the best way to go about making an iPhone application support multiple languages? I am going to put separate versions for each language in the App Store, but what is the best way to represent this in Xcode?

Putting a separate app in the store for each language is NOT the way to go. The iPhone SDK handles multiple languages with grace, and you only need to have a single app with all the various translations. The iPhone's locale setting will direct your app as to which language to use.

A good place to start is here.

I haven't done iPhone dev yet, but "normal" Cocoa apps use ".lproj" strings files for different languages. See the docs about those, that should help. Good luck.

Related

What's the best way to publish a multilingual iphone game on the AppStore?

I'm close to publishing an iPhone game on the AppStore and I'm wondering what would be the best way to publish a multilingual game...
Should I use the iPhone language settings to load the language accordingly?
Publish multiple versions of the same game but in different languages?
Put a setting on the game to change languages (or would users prefer not to use this one...) ?
Any ideas, recommendations, or best practices would be greatly appreciated.
One app. Period.
Always use the user's current locale, and make a reasonable assumption for default in case you lack localizations users may be using. I've seen most commonly English be used as the default. Myself, I wouldn't even supply an override; the user has the device in their preferred localization already.
I would definitely include all languages in a single app. You could set the default language to the language that the user has enabled on his phone and add an additional option in your app's settings.

How to localize App Store meta data for Phonegap app on iPhone

i'm currently wondering how to add more localizations to my PhoneGap App on the App Store. So it is already deployed, and in App Store it shows under Languages, right under the Icon "English, Spanish" but I never changed any configs or so to acheive this. I found in my xCode-project /App_NAME/Resources a en.lproj and es.lproj folder with Localisation.strings.
The standard way I found so far would be to do this.
But for some Reason those folder I create never appear in xCode. What am I doing wrong, and why can't I add more of these ominous XX.lproj-folders?
I'm totally stuck.
I can do javascript localisations for the app itsself but without this app-store languages I can't get my meta-data translated...
Any experience highly appreciated!
the best way is to do it from javascript since you're using PhoneGap.
retrieve the device/userAgent language (or locale, or simply ask the user for a preferred language) and then edit the content accordingly.
If you want to localize app store meta data, your app, or your marketing content there are tools out there now to speed the process such as TraductoPro, which also has built-in human translation ordering services. It even automates or 'macronizes' your code, making the xcode strings localizable. It's a Mac app, simple to use.

iphone python or perl processor, or similar

I have an application to develop but the problem is that is must download part of behavior as a list of instructions from a server.
Ideally it will download scripting code and execute it. The question is if there are any libraries to make it? For example, I have python script and I want to to execute it on device...
Any options?
thank you
Lua is very popular for games. You can embed Python, too. Apple won't enforce the "Objective-C only" clause unless you make it obvious that you use Python to script behavior. Do you think all the games on the store are scripted in Objective-C? No way. Just don't make your transgressions obvious and you'll be fine.
For security reasons, the app store does not allow apps containing programming languages capable of executing arbitrary code on the phone, so your app's market would be limited to users willing to jailbreak their phones to circumvent this restriction.
You could, depending on what you want to do, look at using the browser's JavaScript.

Localizing games for various countries

I am developing an iPhone game and want to sell it in different regions, making it available in a number of languages.
Should the app be repackaged in each different version for each language, (e.g. Japanese, English, Chinese etc), or would one game package all the art and language and then detect where it is and display accordingly?
Does Apple allow mutliple versions of one game to be submitted, each game with a different language?
By all means go for a single app. And if done correctly - which is very easy - the system will chose the correct language automatically. So don't use a language setting, either.
Having many different versions can easily get a pain, both to support and for the customer, who will simply be frustrated because he easily buys the wrong version.
If I were Apple (which I'm not) I'd say this is a typical case of spamming the AppStore and would ban you from there...
So do the reasonable thing -> one app for all.
As Eiko said, go for one app, although I disagree that Apple would ban you.
Look at the Apple documentation for "Internationalization" for help on how to do so.

Can you develop native iPhone apps in Ruby?

Hi I'm looking into iPhone development, and Objective-C is not be my preferred language. As far as I can see at this moment Ruby cannot be used to talk to Cocoa Touch at the moment on the iPhone.
So my question is, am I wrong? Can I use Ruby on the iPhone to develop Cocoa Touch applications. And what is the future looking like for Ruby on the iPhone?
Now you can with RubyMotion
In the iPhone OS, mprotect() will fail if you try to use it to mark writable sections of memory as executable. This breaks bridges like RubyCocoa (and probably MacRuby) that use libffi to create Objective-C method handlers at runtime. I believe that this is by design because it was not always the case.
Ultimately, this is more a matter of platform politics than technology, but a technical workaround for this exists. Instead of generating custom method handlers at runtime, precompile a pool of reconfigurable ones that are assigned as needed, essentially making the bridging process entirely data-driven. As far as I know, this is not yet being done in RubyCocoa or MacRuby.
Another significant thing to consider is that the compiled Ruby and RubyCocoa runtimes can be significantly larger than compiled Objective-C apps. If these libraries were available on the iPhone, this wouldn't be an issue, but for now, even if you had RubyCocoa working, you might not want to use it for apps that you distribute.
No, you are correct. Currently, and most likely for the foreseeable future, Ruby will not be an option, at least for AppStore applications. There's no reason you couldn't do this on a Jailbroken phone, but Apple is pretty wed to Objective C for official development.
You are better off as a programmer knowing a number of different languages - think of Objective-C as a good learning opportunity.
I've found that things you learn in other languages often make you a better programmer overall, and give you new insights into other languages you already know.
rhomobile is an option to run ruby code on the iPhone, but it's essentially web app development. A web server runs locally on the iPhone and your ruby code renders to standard client side web technologies (html/css/javascript).
http://rhomobile.com/
Actually, the ruby cocoa bridge isn't awkward at all; things work remarkably smoothly, right down to connecting outlets in IB etc. The resulting code is down right beautiful.
As for iPhone development, if you want an official AppStore application, you're out of luck unfortunately. Apple dictated that iPhone is Obj-C/Cocoa Touch, and there's a clause in the SDK license saying that one of the things they will reject an app for is having a language interpreter/JIT compiler, so you couldn't add a ruby interpreter in your app yourself.
Off topic, but hilariously, this is why Flash for the iPhone is Adobe blowing smoke. They couldn't get a swf player onto the AppStore even if they wanted to, per Apple's license.
Uh, Rhodes (Rhomobile) does allow you to do native apps on the iPhone and all other smartphones. Yes, we do leverage doing rendering via the WebUIView control. But we allow all device capabilities and synchronized local data.
You might want to take a look at shinycocos. It is a child project of cocos2d-iphone, an Objective-C game programming framework for iPhone.
I haven't yet played with it, but from the git README I infer that it bundles Ruby 1.9.1 into your app.
I installed the ruby package from Cydia on my iPod Touch 1G jailbroken on 3.1.3:
Seems to work.
Now as for cocoa-touch that is a whole different story I would assume.
Take a look at http://www.appcelerator.com/products/titanium-mobile/
"Native iPhone and Android apps built with Web technologies."
Sounds good isn't it ? ;-)
No you can not create iOS native app in Ruby.
There is only two options for native apps for mac and iOS:-
Objective C and Swift Programming Language
Tutorials:-
Apple's official tutorial on Objective C
Apple's official tutorial on Swift Programing Language
If you are familiar with Ruby and only want to create iOS apps by Ruby. Ruby Motion, can be a cross-platform option for you, but it is not free.
Cross-Platforms
RubyMotion
Xamarin required .net skills
appcelerator HTML,XML,CSS,JS skills required
phonegap HTML,XML,CSS,JS skills required
I imagine it won't work right now, but I'd imagine that you'll eventually be able to use MacRuby to build iphone apps. Apple are putting a lot of work into it
Here's a link to an ADC article describing how to build normal cocoa apps
You don't have to use Objective-C to write iPhone apps. If you use QuickConnectiPhone, http://sourceforge.net/projects/quickconnect/, you can write it completely in JavaScript, CSS, and HTML and still have an installable application not a web app.
If you know ruby you are probably working with JavaScript already.
To see how to install it, run it, and other ideas go to tetontech.wordpress.com
There's an open-source Ruby-Cocoa bridge you might try to get working. But I gather that there's a bit of an impedance mismatch between Ruby and ObjC that makes it a bit awkward to use.
The Ruby Cocoa bridge probably will not work. Most of the bridges for dynamic languages need to generate executable thunks (either manually or with libffi). More limited bridges (for more static languages) may not have such issues.
In either event, bringing up a bridge is probably going to require becoming more familiar with the Objective C runtime than one would just learning how to write Cocoa Touch apps, which probably defeats the point of doing it in the first place.
Currently isnt true, Apple change their policies, take a look at ShinyCocos, is a ruby bindings for the Cocos2D-iphone game framework.
https://github.com/funkaster/shinycocos
One possible solution would be to create an application wrapping for example the rice library (google it) which includes a ruby-vm. I reckon you would be able to create c++ wrappers that you could expose to ruby, thus making an environment for iphone development with ruby. This probably requires a lot of work though ^^