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.
Related
Hi desperate newbie in need of direction! Well I say newbie, I have almost built myself the app I set out to achieve, a tableview to display story titles from my website, that when touched using the navigation controller slides to the story/article.
Only problem is that I only have test data that is embedded into my views as an array (which is no good to me). I need this data to come from my website, www.theknowledgeoflondon.com. I want to take the title to display in the tableview and then when touch it slide to the actual article.
Been reading up and believe that JSON could be the answer or XML? I do not have a clue on this subject and if I thought learning object c and coco touch was hard this JSON OR XML thing seems to be a new world of PAIN for me!!! and there doesn’t seem to be anything by way of good tutorials out there for someone that has not a clue on the subject. My data is drawn from a simple MySql table from a php script and was hoping there is an easy way to feed this into my table view?
Would be very greatful for any information on a good way forward. Have already downloaded SBJson, but then read that JSONTouch is a good alternative to use. Or should I be using straight XML. Any help and good tutorials would be much appriciated.
Thanks you in advance.
Steve
I made an app last week that uses XML and I found it the easier way of doing what you want to do. But I found an awesome tutorial that I believe is perfect for what you are trying to do. It helps you create the web service needed and teaches you how to access the data that you wish to access.
http://www.raywenderlich.com/2941/how-to-write-a-simple-phpmysql-web-service-for-an-ios-app
and also check
http://www.raywenderlich.com/2965/how-to-write-an-ios-app-that-uses-a-web-service
And for even more information on web related subjects also have a look at www.w3schools.com it is an amazing website dedicated to teach about web technologies such as XML and the like.
Hope it helps you as much as it has helped me.
If you have the option to choose then I will suggest to use plist format. Open a plist file with a plain text editor. You will find that that is actually a XML file. The big advantage of using plist is that you don't need another parser. You can convert a plist file directly to NSArray using arrayWithContentsOfFile or arrayWithContentsOfURL or convert them directly to NSDictionary by using similar methods. And you can create them using plist editor of Mac easily.
The UITextView has a method named setContentToHTMLString that displays html inside a UITextView.
But this is a private API and probably gets my app rejected by apple.
Is there any way around this to somehow set the content to an htm string without calling this method directly? or any other way to allow html content in a view that is editable (Keyboard accessible)?
I absolutely loath the Three20 framework. It adds huge bulk to your apps, adds a ton of class categories that you probably don't need, multiplies your compiling time many times on a clean compile, and can cause issues if you accidentally don't set all of the sub-projects settings correctly -- personal horror story, I had an app update in the app store broken on all arm6 devices for 3 weeks after adding Three20 while Apple took their sweet time approving my simple fix.
Anyway, enough bashing on Three20. Here's another option if you want something much more compact that is a simple drop in replacement for UITextView with basic HTML support: http://www.cocoacontrols.com/platforms/ios/controls/bctextview. I don't know if that one supports editing though. This one: http://www.cocoacontrols.com/platforms/ios/controls/egotextview supports rich text editing, but I'm not sure if it's in HTML format. They're both worth a look though to see if you can utilize them for your needs. I would only use Three20 as an absolute last resort, and then still probably wouldn't use it.
The closest thing I know to what you are asking are TTStyledText and TTStyledTextLabel, two classes from the Three20 framework that allows you to treat HTML content. They only support a limited subset of HTML, though, so I don't know if this fit your needs.
If you simply want to display/edit some unformatted text taken from the web, have a look at: +stringWithContentsOfURL:encoding:error:
[UITextView setValue:textString forKey:#"contentToHTMLString"];
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.
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.
Has anyone had experience with MySource Matrix as a content management system? If so, thoughts/opinions/comments?
Thanks in advance.
Absolutely excellent. It takes little while to get used to how it does things with its asset structure, but it is really flexible and powerful. Simple edit interfaces are great too.
Make sure you give it enough hardware. If you want dynamic content without caching you need heaps of grunt to make it hum.
Hands down the best CMS I have ever used. We use it on the Pacific Union College website, as well as many side projects. I am still amazed at all it has to offer compared to other products that are not free.
Give it a good look, and take some time to get past the learning curve, but once you do, it will be more than worth it. :)
I've recently been trying to use it in an organization where many non power users are generating content. - it has many interface bugs and odd behavior, so that many simple tasks (i.e. loading images) often have to be done by an power user (i.e. me).
When you are editing the HTML of page content white space is not preserved. If you where to format the HTML in the WYSIWYG editor, save you changes, and then come back the whitespace you've added will be removed - actually when you switch the WYSIWYG editor into HTML mode it doesn't show you the exact HTML, and does some silly things - like pressing enter inserts non breaking spaces - but doesn't show them until you save and re-enter HTML mode.
it is a number of little details like this which make it generally frustrating to use and disliked by everyone here.