ParseUI localization

Since ParseUI is Open Source it is easy to find that all labels are localized in ParseUI.strings

How can I tell xcode not to use ParseUI.strings at runtime, but my Localisable.strings?

The following structure was created in my project:

enter image description here

But in the debugger file I see that my Localisable.strings are not being used:

2015-05-17 22: 27: 17.711 CoreParse [3582: 216694] Localized string "Loading ..." was not found in CFBundle 0x7f9d93455640 "ParseUI" string table (executable, loaded). 2015-05-17 22: 27: 17.784 CoreParse [3582: 216694] The localized string "Username" was not found in the CFBundle 0x7f9d93455640 "ParseUI" string table (executable, loaded). 2015-05-17 22: 27: 17.784 CoreParse [3582: 216694] Localized string "Password" not found in CFBundle 0x7f9d93455640 "ParseUI" string table (executable, loaded).

+3


source to share


2 answers


I faced the same problem. But I found that you can create a localized string file named "ParseUI.strings" in your project and localize it, then the ParseUI module will read the localized string from that file.



Content in localized string (github link from ParseUI): https://github.com/ParsePlatform/ParseUI-iOS/raw/master/ParseUI/Resources/Localization/en.lproj/ParseUI.strings

+4


source


This is what I did to temporarily fix this issue and still use my own Localizable.strings file.

PFLogInViewController *logInViewController = [[PFLogInViewController alloc] init];
logInViewController.delegate = self;
[logInViewController setFacebookPermissions:[NSArray arrayWithObjects:@"user_friends",@"email", @"public_profile", nil]];
logInViewController.fields = PFLogInFieldsDefault | PFLogInFieldsFacebook | PFLogInFieldsTwitter | PFLogInFieldsSignUpButton;
[logInViewController.logInView.usernameField setPlaceholder:NSLocalizedString(@"Username", @"")];
[logInViewController.logInView.passwordField setPlaceholder:NSLocalizedString(@"Password", @"")];
[logInViewController.logInView.logInButton setTitle:NSLocalizedString(@"Log In", @"") forState:UIControlStateNormal];
[logInViewController.logInView.passwordForgottenButton setTitle:NSLocalizedString(@"Forgot Password?", @"") forState:UIControlStateNormal];
[logInViewController.logInView.signUpButton setTitle:NSLocalizedString(@"Sign Up", @"") forState:UIControlStateNormal];

// Create the sign up view controller
PFSignUpViewController *signUpViewController = [[PFSignUpViewController alloc] init];
[signUpViewController setDelegate:self]; // Set ourselves as the delegate
[signUpViewController.signUpView.usernameField setPlaceholder:NSLocalizedString(@"Username", @"")];
[signUpViewController.signUpView.passwordField setPlaceholder:NSLocalizedString(@"Password", @"")];
[signUpViewController.signUpView.emailField setPlaceholder:NSLocalizedString(@"Email", @"")];
[signUpViewController.signUpView.signUpButton setTitle:NSLocalizedString(@"Sign Up", @"") forState:UIControlStateNormal];

// Assign our sign up controller to be displayed from the login controller
[logInViewController setSignUpController:signUpViewController];

      



There is still a problem with the Register button because they use a special state and I couldn't figure out how to change it correctly.

+1


source







All Articles