Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 03-19-2009, 02: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
 

» Advertisements
» Stats
Members: 158,627
Threads: 89,143
Posts: 380,334
Top Poster: BrianSlick (7,110)
Welcome to our newest member, Hirley2324
Powered by vBadvanced CMPS v3.1.0

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