Setting Strings

Make sure you are using version >= 0.4.3

To set the text for a specific element on a screen, specify the screen name, the name of the element, and the value.

The syntax is like the following:

Cotter.strings.set___<ScreenName>___Strings(Strings.__<ElementName>__, <ValueYouWant>)

For example, if you want to update the Title to "Enter PIN":

Cotter.strings.setPinEnrollmentEnterPinStrings(Strings.Title, "Enter PIN");

Full list of the API to change strings:

// Headers
Cotter.strings.setHeaders(ScreenNames.PinEnrollmentEnterPin, "Activate Pin");
Cotter.strings.setHeaders(ScreenNames.PinEnrollmentReEnterPin, "Confirm Pin");
Cotter.strings.setHeaders(ScreenNames.PinVerification, "Verify Pin");
Cotter.strings.setHeaders(ScreenNames.PinChangeVerifyPin, "Change Pin");
Cotter.strings.setHeaders(ScreenNames.PinChangeEnterPin, "Enter New Pin");
Cotter.strings.setHeaders(ScreenNames.PinChangeReEnterPin, "Confirm New Pin");
Cotter.strings.setHeaders(ScreenNames.RegisterDeviceQRScanner, "Scan QR Code");
Cotter.strings.setHeaders(ScreenNames.RegisterDeviceQRShow, "");
Cotter.strings.setHeaders(ScreenNames.PinReset, "Forgot Pin");
Cotter.strings.setHeaders(ScreenNames.PinResetEnterPin, "Enter New Pin");
Cotter.strings.setHeaders(ScreenNames.PinResetReEnterPin, "Confirm New Pin");
        
// Pin Enrollment Default Strings
Cotter.strings.setPinEnrollmentEnterPinStrings(Strings.Title, "Enter Pin");
Cotter.strings.setPinEnrollmentEnterPinStrings(Strings.ShowPin, "Show Pin");
Cotter.strings.setPinEnrollmentEnterPinStrings(Strings.HidePin, "Hide Pin");
Cotter.strings.setPinEnrollmentEnterPinStrings(Strings.ErrorCombination, "Your PIN is weak. Please enter a stronger PIN.");
Cotter.strings.setPinEnrollmentEnterPinStrings(Strings.DialogTitle, "Are you sure you don't want to setup PIN?");
Cotter.strings.setPinEnrollmentEnterPinStrings(Strings.DialogSubtitle, "Setting up your PIN is important to secure your account.");
Cotter.strings.setPinEnrollmentEnterPinStrings(Strings.DialogPositiveButton, "Setup PIN");
Cotter.strings.setPinEnrollmentEnterPinStrings(Strings.DialogNegativeButton, "Next Time");

Cotter.strings.setPinEnrollmentReEnterPinStrings(Strings.Title, "Re-Enter Pin");
Cotter.strings.setPinEnrollmentReEnterPinStrings(Strings.ShowPin, "Show Pin");
Cotter.strings.setPinEnrollmentReEnterPinStrings(Strings.HidePin, "Hide Pin");
Cotter.strings.setPinEnrollmentReEnterPinStrings(Strings.ErrorNoMatch, "Your PIN doesn't match your previous PIN.");
Cotter.strings.setPinEnrollmentReEnterPinStrings(Strings.ErrorOther, "Something went wrong.");

Cotter.strings.setPinEnrollmentSuccessStrings(Strings.Title, "Successfully Activated PIN");
Cotter.strings.setPinEnrollmentSuccessStrings(Strings.Subtitle, "You can now use your PIN to unlock your account and make transactions");
Cotter.strings.setPinEnrollmentSuccessStrings(Strings.ButtonText, "Done");
Cotter.strings.setPinEnrollmentSuccessStrings(Strings.BiometricTitle, "Biometric Verification");
Cotter.strings.setPinEnrollmentSuccessStrings(Strings.BiometricSubtitle, "Protect your account using Biometrics");
Cotter.strings.setPinEnrollmentSuccessStrings(Strings.BiometricNegativeButton, "Cancel");
Cotter.strings.setPinEnrollmentSuccessStrings(Strings.DialogTitle, "Something went wrong");
Cotter.strings.setPinEnrollmentSuccessStrings(Strings.DialogSubtitle, "You may have already enrolled Biometrics before.");
Cotter.strings.setPinEnrollmentSuccessStrings(Strings.DialogPositiveButton, "Skip this step");
Cotter.strings.setPinEnrollmentSuccessStrings(Strings.DialogNegativeButton, "Try Again");

// Pin Verification default strings
Cotter.strings.setPinVerificationStrings(Strings.Title, "Enter Pin");
Cotter.strings.setPinVerificationStrings(Strings.ForgotPin, "Forgot Pin");
Cotter.strings.setPinVerificationStrings(Strings.ErrorInvalid, "Your PIN is invalid");
Cotter.strings.setPinVerificationStrings(Strings.ErrorOther, "Something went wrong.");
Cotter.strings.setPinVerificationStrings(Strings.BiometricTitle, "Verify Biometric");
Cotter.strings.setPinVerificationStrings(Strings.BiometricSubtitle, "Verify your biometric to continue");
Cotter.strings.setPinVerificationStrings(Strings.BiometricNegativeButton, "Input Pin");
Cotter.strings.setPinVerificationStrings(Strings.DialogTitle, "Unable to verify biometric");
Cotter.strings.setPinVerificationStrings(Strings.DialogSubtitle, "Do you want to try again or enter pin instead?");
Cotter.strings.setPinVerificationStrings(Strings.DialogPositiveButton, "Input PIN");
Cotter.strings.setPinVerificationStrings(Strings.DialogNegativeButton, "Try Again");

// Pin Change default strings
Cotter.strings.setPinChangeVerifyPinStrings(Strings.Title, "Enter Current Pin");
Cotter.strings.setPinChangeVerifyPinStrings(Strings.ShowPin, "Show Pin");
Cotter.strings.setPinChangeVerifyPinStrings(Strings.HidePin, "Hide Pin");
Cotter.strings.setPinChangeVerifyPinStrings(Strings.ErrorInvalid, "Your PIN is invalid");
Cotter.strings.setPinChangeVerifyPinStrings(Strings.ErrorOther, "Something went wrong");

Cotter.strings.setPinChangeEnterPinStrings(Strings.Title, "Enter New Pin");
Cotter.strings.setPinChangeEnterPinStrings(Strings.ShowPin, "Show Pin");
Cotter.strings.setPinChangeEnterPinStrings(Strings.HidePin, "Hide Pin");
Cotter.strings.setPinChangeEnterPinStrings(Strings.ErrorCombination, "Your PIN is weak. Please enter a stronger PIN.");
Cotter.strings.setPinChangeEnterPinStrings(Strings.DialogTitle, "Are you sure you don't want to setup your new PIN?");
Cotter.strings.setPinChangeEnterPinStrings(Strings.DialogSubtitle, "You will be able to use your old PIN if you don't setup a new PIN.");
Cotter.strings.setPinChangeEnterPinStrings(Strings.DialogPositiveButton, "Setup New PIN");
Cotter.strings.setPinChangeEnterPinStrings(Strings.DialogNegativeButton, "Next Time");

Cotter.strings.setPinChangeReEnterPinStrings(Strings.Title, "Re-Enter New Pin");
Cotter.strings.setPinChangeReEnterPinStrings(Strings.ShowPin, "Show Pin");
Cotter.strings.setPinChangeReEnterPinStrings(Strings.HidePin, "Hide Pin");
Cotter.strings.setPinChangeReEnterPinStrings(Strings.ErrorNoMatch, "Your PIN doesn't match your previous PIN.");

Cotter.strings.setPinChangeSuccessStrings(Strings.Title, "Successfully Change PIN");
Cotter.strings.setPinChangeSuccessStrings(Strings.Subtitle, "You can now use your new PIN to unlock your account and make transactions");
Cotter.strings.setPinChangeSuccessStrings(Strings.ButtonText, "Done");

// Enable Disable Biometric
Cotter.strings.setBiometricChangeStrings(Strings.BiometricTitle, "Biometric Verification");
Cotter.strings.setBiometricChangeStrings(Strings.BiometricSubtitle, "Protect your account using Biometrics");
Cotter.strings.setBiometricChangeStrings(Strings.BiometricNegativeButton, "Cancel");
Cotter.strings.setBiometricChangeStrings(Strings.DialogTitle, "Something went wrong");
Cotter.strings.setBiometricChangeStrings(Strings.DialogSubtitle, "You may have already enrolled Biometrics before.");
Cotter.strings.setBiometricChangeStrings(Strings.DialogDisabledSubtitle, "You may not have Biometrics enrolled.");
Cotter.strings.setBiometricChangeStrings(Strings.DialogPositiveButton, "Cancel");
Cotter.strings.setBiometricChangeStrings(Strings.DialogNegativeButton, "Try Again");

// Network Error Dialog
Cotter.strings.setNetworkErrorStrings(Strings.DialogTitle, "Connection Lost");
Cotter.strings.setNetworkErrorStrings(Strings.DialogSubtitle, "Please establish a stronger internet connection and try again.");
Cotter.strings.setNetworkErrorStrings(Strings.DialogPositiveButton, "Try Again");

// HTTP Error Dialog (Not Used)
Cotter.strings.setHttpErrorStrings(Strings.DialogTitle, "Something went wrong");
Cotter.strings.setHttpErrorStrings(Strings.DialogSubtitle, "Looks like there's an error on our end. Please try again.");
Cotter.strings.setHttpErrorStrings(Strings.DialogPositiveButton, "Try Again");

// Approve login from Non-Trusted Device
Cotter.strings.setApproveRequestStrings(Strings.Title, "Are you trying to sign in?");
Cotter.strings.setApproveRequestStrings(Strings.Subtitle, "Someone is trying to sign in to your account from another device.");
Cotter.strings.setApproveRequestStrings(Strings.ButtonYes, "Yes");
Cotter.strings.setApproveRequestStrings(Strings.ButtonNo, "No, it's not me");

// Request Auth
Cotter.strings.setRequestAuthStrings(Strings.DialogTitle, "Approve this login from your phone");
Cotter.strings.setRequestAuthStrings(Strings.DialogSubtitle, "A notification is sent to your trusted device to confirm it's you.");
Cotter.strings.setRequestAuthErrorStrings(Strings.DialogTitle, "Something went wrong");
Cotter.strings.setRequestAuthErrorStrings(Strings.DialogSubtitle, "We're unable to confirm that it's you. Please try again.");

// Success Sheet
Cotter.strings.setSuccessSheetStrings(Strings.DialogTitle, "Success Registering New Device");
Cotter.strings.setSuccessSheetStrings(Strings.DialogSubtitle, "You can now use your new device to access your account without approval.");
Cotter.strings.setSuccessSheetErrorStrings(Strings.DialogTitle, "Unable to Register New Device");
Cotter.strings.setSuccessSheetErrorStrings(Strings.DialogSubtitle, "Please try again.");

// QR Code Show
Cotter.strings.setQRCodeShowStrings(Strings.Title, "Register this Device");
Cotter.strings.setQRCodeShowStrings(Strings.Subtitle, "Please scan this QR Code from a Trusted Device.");
Cotter.strings.setQRCodeShowErrorStrings(Strings.Title, "Something went wrong");
Cotter.strings.setQRCodeShowErrorStrings(Strings.Subtitle, "The request timed out. Please try again.");

// Reset Pin
Cotter.strings.setPinResetStrings(Strings.Title, "Verification Code");
Cotter.strings.setPinResetStrings(Strings.Subtitle, "We have sent a code to");
Cotter.strings.setPinResetStrings(Strings.ResendCode, "Resend Code");
Cotter.strings.setPinResetStrings(Strings.ErrorInvalid, "The code you entered is invalid");
Cotter.strings.setPinResetStrings(Strings.ErrorOther, "Something went wrong");

Cotter.strings.setPinResetEnterPinStrings(Strings.Title, "Enter New Pin");
Cotter.strings.setPinResetEnterPinStrings(Strings.ShowPin, "Show Pin");
Cotter.strings.setPinResetEnterPinStrings(Strings.HidePin, "Hide Pin");
Cotter.strings.setPinResetEnterPinStrings(Strings.ErrorCombination, "Your PIN is weak. Please enter a stronger PIN.");
Cotter.strings.setPinResetEnterPinStrings(Strings.DialogTitle, "Are you sure you don't want to setup your new PIN?");
Cotter.strings.setPinResetEnterPinStrings(Strings.DialogSubtitle, "You will be able to use your old PIN if you don't setup a new PIN.");
Cotter.strings.setPinResetEnterPinStrings(Strings.DialogPositiveButton, "Setup New PIN");
Cotter.strings.setPinResetEnterPinStrings(Strings.DialogNegativeButton, "Next Time");

Cotter.strings.setPinResetReEnterPinStrings(Strings.Title, "Re-Enter New Pin");
Cotter.strings.setPinResetReEnterPinStrings(Strings.ShowPin, "Show Pin");
Cotter.strings.setPinResetReEnterPinStrings(Strings.HidePin, "Hide Pin");
Cotter.strings.setPinResetReEnterPinStrings(Strings.ErrorNoMatch, "Your PIN doesn't match your previous PIN.");

Cotter.strings.setPinResetSuccessStrings(Strings.Title, "Successfully made a new Pin");
Cotter.strings.setPinResetSuccessStrings(Strings.Subtitle, "You can now use your new PIN to unlock your account");
Cotter.strings.setPinResetSuccessStrings(Strings.ButtonText, "Done");

Last updated