1. Create your XIB:
2. Load XIB and create it as a view:
#undef NSLocalizedString#define NSLocalizedString(key, comment) \ [CLocale localizedString:(key)] @interface CLocale : NSObject + (NSString*) localizedString:(NSString*)key; @end
#import "CLocale.h" @implementation CLocale + (NSString*) localizedString:(NSString*)key { NSArray* languages = [[NSUserDefaults standardUserDefaults] objectForKey:@"AppleLanguages"]; NSString* currentLocale = [languages objectAtIndex:0]; NSString* localized = [[NSBundle mainBundle] localizedStringForKey:key value:@"" table:nil]; // if key and localized are same, also it is not english, // then force to use english language if ([localized compare:key] == NSOrderedSame && [currentLocale compare:@"en"] != NSOrderedSame) { NSBundle *bundle = [NSBundle bundleWithPath:[[NSBundle mainBundle] pathForResource:@"en" ofType:@"lproj"]]; localized = NSLocalizedStringFromTableInBundle(key, nil, bundle, nil); } return localized; } @end
#import "CLocale.h"
Latest ROM: G930FXXU1DQEU Download: https://kfhost.net/tpl/firmwares.php?record=B7E6DE774E3811E7963AFA163EE8F90B Reference: http://...