Advertise Books Events Forum News Social Networking Support Us

sdkIQ for iPhone
($4.99)

Shape Up
($0.99)

Your First iPhone App
($1.99)

iVidCam Free
(free)

Kid Art
($0.99)

iPUBQUIZ
(£1.19)

ArtStudio
($3.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 03-19-2009, 01:20 AM   #7 (permalink)
purej
New Member
 
Join Date: Jan 2009
Posts: 4
Default

Quote:
Originally Posted by manicaesar View Post
Thanks, it is good to know, but I was wondering if you could attach some code - I'm especially interested in method invoked, when the button is pressed - how to make the language change - how to make used Localizable.strings "swap"? What should I do?

Thanks for your reply!
Here is some testing I have done now. I can programatically force to load the view while ignoring the phone's setting

Here is some my sample Code
I use English and chinese as my application language

When loading English nib
Code:
NSBundle *myLocalizedBundle=[NSBundle bundleWithPath:[NSString stringWithFormat:@"%@/%@",[[NSBundle mainBundle]bundlePath],"@English.lproj"]];
SomeViewController *viewController=[[SomeViewController alloc] initWithNibName:@"NibName" bundle:myLocalizedBundle];
When loading Chinese nib
Code:
NSBundle *myLocalizedBundle=[NSBundle bundleWithPath:[NSString stringWithFormat:@"%@/%@",[[NSBundle mainBundle]bundlePath],"@zh.lproj"]];
SomeViewController *viewController=[[SomeViewController alloc] initWithNibName:@"NibName" bundle:myLocalizedBundle];
Here is my finding, it works for me now.
Let's discuss if there is any new findings
purej is offline   Reply With Quote
 
Enter the iPhone App Challenge!  Win $500!
» Advertisements
» Online Users: 681
16 members and 665 guests
adison, ali.dar, Ath, Ed99, harry123456, kristapsz, lokidil, maccoykung, pereorra, rarindeed, rendezvouscp, SteveMobs, thadre, Thaurin, warcrow, _Mac
Most users ever online was 779, 05-11-2009 at 09:55 AM.
» Stats
Members: 24,162
Threads: 38,935
Posts: 170,827
Top Poster: smasher (2,565)
Welcome to our newest member, ddustin
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 03:06 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.