iPhone Internationalization. What is the simplest workflow for me? - iphone

I am wising up and getting my internationalization act together. Right off the bat I am a bit swamped by all the docs Apple provides so I was wondering of someone could sketch a workflow for my situation.
Before I begin, I browsed some Apple example code and noticed this NIB file - MainWindow.xib - in the Resources folder:
alt text http://daturner.com/stackoverflow/nib.jpg
This clearly has something to do with internationalization/localization. Could someone please explain how this is created and where in the workflow it happens?
My app is fundamentally an imaging app with a few labels that I currently programmatically internationalize using NSLocalizedString(...). If I set all my labels programmatically and wrap all my strings with NSLocalizedString(...) can I completely ignore the NIB issues?
Thanks in advance,
Doug

To answer your last part of the question: Yes!
In my experience, it can be a pain to localize Nib's so if at all possible try to limit the localization effort to .strings files.

Related

Name of special alert view iphone

I have been looking for the name of this UI element for a while now, but I cant come up with anything. What is the name of the round rect with 'Reloading Data' in it? I thought that I remembered using a view like this a while back, and there was some open source library that made its use much easier.
Screen shot of cydia.
The Apple API is private and cannot be used in AppStore apps. I and many others use MBProgressHUD: http://cocoadev.com/wiki/MBProgressHUD.
It's MBProgressHUD.
You will get more opensource controls on this link.
Why don't you just use a UIActivityIndicator? It essentially provides the same utility without the need to implement 3rd party code? Do you really need any custom behavior the class does not already provide? The simpler the better you know..? ;)

How to change all the strings in an iphone application with respective selected language in settings?

I need help from you, I need to display all the text, labels , strings and what ever text is showing to user in the iphone application with respective selected language in settings of iphone.
for example user selects German or French in settings of iPhone language, then my application should provide or view the details in that language.
I need sample code for localization, Is there any simple way to follow the standard steps to translate the code to different languages in iphone sdk.
please healp me, I hope that I can get efficient solution on this from you.
Thank you,
Madan Mohan.
See here: http://www.icanlocalize.com/site/tutorials/iphone-applications-localization-guide/
I think the previous link gives a pretty good idea of how to do I18N on the iPhone, but if you feel you need more info, you can try this article http://blog.federicomestrone.com/2010/05/18/internationalise-your-iphone-apps-with-xcode/ which is just slightly more code-orientated.
The point though is always the same - you have to separate code from text resources and load all your text (strings) with the NSLocalizedString macro, or a variant thereof.

iPhone UIView element similar to the lock screen

Does anyone know if there is an open source project for an UIView element that acts in a similar way to the lock screen for the iPhone.
I am working on an app that has some sensitive data, and I want to add another layer of comfort for users, to be able to setup a 4 digit pin number on the app.
I've seen apps like LoseIt and Weightbot that have similar functionality.
There isn't any element for this in the UI Library from what I've been able to find, and was hoping some kind soul might have open sourced something similar to this.
Thanks in advance!!!
Thanks to Andiih above for the answer, because I found an open source version on GitHub based on the name of the one he found.
http://github.com/haroldthehungry/CPLockController
Its not a free component, but check out http://www.drobnik.com/touch/parts-store/ the DTPinLockController - I think this does what you want.
And another open source one (BSD license) is at:
https://github.com/Krishna/Lock-Screen

iphone how to localize only particular parts of app

i'm making a korean/english app, so naturally i would need both english and korean displayed on the same tableview cell at the same time. i've considered specifying an element in the plist to be a particular language... but how would i write in korean characters?
i have a dreadful feeling there will be much to custom code for this without apple's wonderful documentation. thanks for any guidance in advance.
Holy monkey. Turns out I thought it was way more difficult than it is, and I skipped even testing the most basic ways of doing it. All you have to do is basically copy and paste the foreign characters into the plist... That's it. Nothing else. Face in hand and lesson learnt.

Common, reusable iPhone-App configuration screen

I'm writing code that will allow my iphone-app to have a "configuration page".
A grouped, scrolling, UITableView... with cells that contain the needed textFields, switches, sliders, etc.
It is an ENOURMOUS amount of code. Is there an easier way?
Is there a way I could create a simple text-file, contain all my desired design choices and have my (reusable) code build the TableView for me?
Or... can I just do the whole thing quicker/easier in Interface Builder instead of code?
Basically there are two approaches here :
you rely on what Apple gives you and implement a Bundle Settings (basically a dictionary that describes how the settings screen should look like), and then , your settings will be in the "Settings" application of the iPhone.
The drawback here is that what apple provides is quite limited and you won't be able to implement some of the most complicated settings you can see in "standard" (pre-installed) apple application settings.
That's why many developers are switching to "inapp" settings thanks to open source FWK or they reimplement everythingh from scratch but it can be a lot of code as you said.
You reimplement your own UIViewController for settings or you rely on some framework that will provide you the UIViewController to extend from and ease your implementation.
There are 2 good frameworks for that (Jesse cited one of them, but there's another one )
InAppSettings ( http://inscopeapps.com/blog/inappsettings-10/ )
InAppSettingsKit ( http://inappsettingskit.com/ )
A comparison of the two framework can be found here : http://inscopeapps.com/blog/inappsettings-vs-inappsettingskit/
(ok that's from one of the two authors but at least this gives an idea ;)
If you can live with the limitations of the standard application preferences in iPhone, you can actually create this using a settings bundle which only needs a plist and optionally a localized strings file.
You can check out Apple documentations for this:
http://developer.apple.com/iphone/library/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/ApplicationSettings/ApplicationSettings.html
Claus
If you're looking for a ready made and reusable solution, you can check
http://www.inappsettingskit.com/
It's open source too, so it's useful as a base.
I never found an easy and efficient way to build complicated table view by using Interface Builder, so I think programming the settings view is more preferable.
If you're talking about using a text file or plist, you may want to mimic the Settings Bundle design of Settings app.
Load the plist data upon the app launch.
I've built something like what you're looking for. Going off Claus's answer as well, it basically just duplicates the interface of the Settings application using the same settings.plist file as the settings app. The only difference is that it's a view controller that you can put inside the app. There's a surprisingly small amount of coding involved, it was just a lot of looking at the settings app to see exactly how things were laid out.