Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Nekbeth

macrumors regular
Original poster
Feb 20, 2011
101
0
Vatican City
Hi, I'm working on localizing my App. I have successfully localize my nibs but I'm having some trouble with plist. what is the best practice to localize them? using strings? or doing it the same way as a nib or image? Does every file I localize must be in the same language specific folder?


Please let me know if you need more specific info.

Thank you
 

Sydde

macrumors 68030
Aug 17, 2009
2,552
7,050
IOKWARDI
Hi, I'm working on localizing my App. I have successfully localize my nibs but I'm having some trouble with plist. what is the best practice to localize them? using strings? or doing it the same way as a nib or image? Does every file I localize must be in the same language specific folder?
Think of your keys as private (internal to your program). If people who speak your language can understand your keys and what the names mean, fine, but do not use "localized" plist keys. Only the content (objects referred to by the keys) should be localized. Arrange your plist files in such a way that localization will not affect anything but the content referred to by the keys.
 

PhoneyDeveloper

macrumors 68040
Sep 2, 2008
3,114
93
It is rude to cross-post the same question to multiple forums. You should allow 24 hours to pass if you post a question and it remains unanswered before posting somewhere else. You've only waited three hours this time since you posted at this question at the Apple forum.
 

PhoneyDeveloper

macrumors 68040
Sep 2, 2008
3,114
93
24 hours is ridiculous.

Seriously? But 3 hours or less is OK?

IMO, cross-posting of questions is abusive. Assuming that people must answer your questions immediately is rude. The questions posted to programming forums are not urgent like "What is the number for the hospital? I think I'm having a heart attack." Just wait a little while.

People who answer questions here take time and expend effort to do so and should not be abused.

Learning to program on iOS is not a matter of spamming the forums with questions. That's not how to learn.
 

Nekbeth

macrumors regular
Original poster
Feb 20, 2011
101
0
Vatican City
:D you are following every comment I post in the internet Phoney, don't you have something better to do with your time? I understand you don't want to help me but you could at least ignore my threads and let someone else help out.

EDIT:

Great !!, I figured it out.

If your a beginner, this is what you can do.

1 - Create 2 plist files, one for each language.

2- Look for your code and find where you use your plist, then you only have to change the string to this :
Code:
NSLocalizedString(@"en.plist",@"")
In my case it was inside a delegate, I needed to turn my plist into a dictionary like this:

Code:
NSString *Path2 = [[NSBundle mainBundle] bundlePath];
	NSString *DataPath2 = [Path2 stringByAppendingPathComponent:NSLocalizedString(@"en.plist",@"")];
	
	NSDictionary *tempDict2 = [[NSDictionary alloc] initWithContentsOfFile:DataPath2];
	self.data = tempDict2;
	[tempDict2 release];


3- Create two string files and name them as you like (e.g. en.strings and it.strings)

4 - Inside the en.strings type this :
Code:
"en.plist" = "en.plist";  // For English

and inside the it.strings type:
Code:
"it.plist" = "it.plist";   // For Italian


Thats it. Sometimes you will need to clean up and reinstall the app. change the language and you'll see the results :p
 
Last edited by a moderator:

PhoneyDeveloper

macrumors 68040
Sep 2, 2008
3,114
93
I'm sure I'm not following them all.

I'm only making one point. Cross-posting is rude. If you don't do it I won't complain about it.

"If you don't want to help me just don't ..."

"Please don't reply to my threads in the future" etc.

"Just give me teh codes"

blah blah blah
 

Nekbeth

macrumors regular
Original poster
Feb 20, 2011
101
0
Vatican City
Well, then Im sure I'll be seeing you around me a lot :), because I get a lot of my answers that way. I actually pay to Apple to have access to its Forum, so I'm very much entitle to ask questions there and in any other forums.
 

PhoneyDeveloper

macrumors 68040
Sep 2, 2008
3,114
93
Yes, you're entitled to ask questions. Like everyone else. I assume you realize that we all pay to access that forum.

Just ask your questions and wait for the answers. Like everyone else.
 

RonC

macrumors regular
Oct 18, 2007
108
0
Chicago-area
... so I'm very much entitle to ask questions there and in any other forums.

Yes, you are, and we're very much entitle[sic] to not answer them.

There is an implicit social contract of behavior that is expected here. If you don't follow the rules, the community will shun you. Phoney is generally a very helpful resource, so please don't antagonize him.
 

Nekbeth

macrumors regular
Original poster
Feb 20, 2011
101
0
Vatican City
Yes, you are, and we're very much entitle[sic] to not answer them.

There is an implicit social contract of behavior that is expected here. If you don't follow the rules, the community will shun you. Phoney is generally a very helpful resource, so please don't antagonize him.

You can answer or not Ron, not saying you have to answer it. Phoney is just upset because I usually get my answers in 1 day or less while others get it in months or spend a lot $$ to get it done. Phoney might be D Master of iOS but personally he's just trying to burn me with the community because I ask the same question in two forums, so if he's not helping me.. I really don't care if I antagonize him or not, I'm still going to get my answers from forums, books , videos or any other documentation.

I also think he doesn't give a damn if I ask the same question in other forums. I have seen his posts and he usually gives a hard time to newbies trying to discourage them. He just doesn't like to share he's precious knowledge to new developers. Fortunately, some others do enjoy sharing it and have the patience to do it. (voluntary)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.