Localize a UITextView - iphone

How do I localize a UITextView?
I saw a lot of examples for a UITextField but none for UITextView.
I need to localize my application's description in the about section.

If you've written the description directly into a UITextView in the XIB, you will need to duplicate the XIB (just use Xcode's localization tool) and then copy and paste the translated text into the new XIB.
If there are several XIBs or you need to send the text to translators, just use GENSTRINGS on all the XIBs. See here: http://kb.applingua.com/2011/07/extracting-strings-from-your-m-class-files/

Related

iOS 7 storyboard localization with attributed Labels

I am generating my String- Files with ibtool from my Base Storyboard for all my languages...For some reason ibtool is not extracting UILabels with style "attributed"...
I have no Key/Value Pair for those labels...Does somebody has a clue why?!
I ended up concluding that it couldn't be done using ibtool in the
present version.
Instead I let the Textview be a plain text view and, using my
subclass, parsed its text property so I could make a
NSMutableAttributedString and set the needed properties.
That enabled me to use ibtool to extract the strings and still have an
attributed textview.
Localizing attributed UITextView from storyboard

Is there a way to capture/scrape the text content programmatically on iOS?

Similar to taking a screenshot programmatically, except, I want just the text contents on the screen. I guess I could put the screenshot through an OCR, but, I am hoping there's a better solution.
one way of doing it take the UIWindow instance and traverse through all the views in the window and check whether they are subclass of UILabel and UITextField or UITextView, if they are you can take the text from there.

Iphone user input structure

I am new to iPhone development and I am looking at exactly what is shown in the picture to allow users to write input.
But I cannot find what exactly is it! Are those some special kind of UITextFields? Are they a special kind of UITableView? What is it?
This is a UITableView with custom UITableViewCell's that contain UITextFields. You can easily do this by loading your UITableViewCell from custom XIB files, in which you've dropped UITextFields. As far as the "hints" you see in each field, that's the "Placeholder" property of UITextField.
Those are grouped tableviews with custom table cells that contain textfields and single line etched separators. Make sure to set the style to "grouped"
The above basically consist of UItableviewCell with a Uitextfield within it.
If you are on ios5 (which i assume you will be), you can add UItableviewcontroller from you Interface Builder and from there, taking the advice to set the style of the table to "grouped".
you should have the similar outlook of the above for the background.
In here, if you select a cell you should have the option to set a few different style to your uitableview cell.
If none of the default styles works for you, just select custom and add your own uitextfield or uibutton.
Note: There's a bit of difference between prototype cell.

Localising xib's (iPhone) workflow

I have figured out how to loclize, but it seems yo end up with a lot of paralell xib's.
Is there a good way to manage changes in xib's that as been localized, or do I have to be very strict about not localizing before the xib's are fixed?
I usually create outlets for those buttons and labels that need to be localized. I then localize these in viewDidLoad or awakeFromNib. This however does not allow you to also reposition and resize the buttons depending on the language, but for now I did not have to do that.
The problem I have with localizing the XIBs themselves is that, as soon as you want to add functionality (e.g. an additional button) later, you have to meticulously apply these changes to all localizations of that XIB. For me a XIB is almost never fixed.

How Can you Localize a Label in iPhone SDK?

I know you can localize a NSString or even an image (which is pretty cool), but can you localize a label that is text in the iPhone SDK?
If the label is part of a XIB, you localize the XIB. If it's programmatically created, then you localize the NSString.