SDK Locale for Cordova
This section covers how to change the language of the SDK in your app as well as the content of all Instabug messages that your users see for Cordova apps.
Setting the Locale
The SDK will automatically use the current locale of your user's device, however, you can override it with the following method.
Instabug.setLocale('french');
Here are the possible locale values.
'arabic'
'chineseSimplified'
'chineseTraditional'
'english'
'french'
'german'
'italian'
'japanese'
'korean'
'polish'
'portugueseBrazil'
'russian'
'spanish'
'swedish'
'turkish'
'czech'
Dashboard Language
At the moment, the Instabug dashboard only supports English. Changing the SDK locale will not change the language of your dashboard.
Overriding String Values
You can also override each string shown to your users individually using the following method.
Instabug.setString(Instabug.strings.invalidEmailMessage, 'Please enter a correct email address');
Here are the possible key values.
Instabug.strings.shakeHint
Instabug.strings.swipeHint
Instabug.strings.edgeSwipeStartHint
Instabug.strings.startAlertText
Instabug.strings.invalidEmailMessage
Instabug.strings.invalidEmailTitle
Instabug.strings.invalidCommentMessage
Instabug.strings.invalidCommentTitle
Instabug.strings.invocationHeader
Instabug.strings.reportQuestion
Instabug.strings.reportBug
Instabug.strings.reportFeedback
Instabug.strings.emailFieldHint
Instabug.strings.commentFieldHintForBugReport
Instabug.strings.commentFieldHintForFeedback
Instabug.strings.commentFieldHintForQuestion
Instabug.strings.videoPressRecord
Instabug.strings.addVideoMessage
Instabug.strings.addVoiceMessage
Instabug.strings.addImageFromGallery
Instabug.strings.addExtraScreenshot
Instabug.strings.audioRecordingPermissionDeniedTitle
Instabug.strings.audioRecordingPermissionDeniedMessage
Instabug.strings.microphonePermissionAlertSettingsButtonText
Instabug.strings.recordingMessageToHoldText
Instabug.strings.recordingMessageToReleaseText
Instabug.strings.conversationsHeaderTitle
Instabug.strings.screenshotHeaderTitle
Instabug.strings.doneButtonText
Instabug.strings.okButtonText
Instabug.strings.cancelButtonText
Instabug.strings.thankYouText
Instabug.strings.audio
Instabug.strings.image
Instabug.strings.screenRecording
Instabug.strings.team
Instabug.strings.messagesNotification
Instabug.strings.messagesNotificationAndOthers
Instabug.strings.conversationTextFieldHint
Instabug.strings.collectingDataText
Instabug.strings.thankYouAlertText
Instabug.strings.welcomeMessageBetaWelcomeStepTitle
Instabug.strings.welcomeMessageBetaWelcomeStepContent
Instabug.strings.welcomeMessageBetaHowToReportStepTitle
Instabug.strings.welcomeMessageBetaHowToReportStepContent
Instabug.strings.welcomeMessageBetaFinishStepTitle
Instabug.strings.welcomeMessageBetaFinishStepContent
Instabug.strings.welcomeMessageLiveWelcomeStepTitle
Instabug.strings.welcomeMessageLiveWelcomeStepContent
Instabug.strings.surveysStoreRatingThanksTitle
Instabug.strings.surveysStoreRatingThanksSubtitle
Instabug.strings.reportBugDescription
Instabug.strings.reportFeedbackDescription
Instabug.strings.reportQuestionDescription
Instabug.strings.requestFeatureDescription
Instabug.strings.discardAlertTitle
Instabug.strings.discardAlertMessage
Instabug.strings.discardAlertCancel
Instabug.strings.discardAlertAction
Instabug.strings.addAttachmentButtonTitleStringName
Instabug.strings.reportReproStepsDisclaimerBody
Instabug.strings.reportReproStepsDisclaimerLink
Instabug.strings.reproStepsProgressDialogBody
Instabug.strings.reproStepsListHeader
Instabug.strings.reproStepsListDescription
Instabug.strings.reproStepsListEmptyStateDescription
Instabug.strings.reproStepsListItemTitle
Instabug.strings.insufficientContentMessage
Instabug.strings.insufficientContentTitle
Updated about 1 year ago
The locale is reflected in all aspects of the Instabug SDK that your users see in your app, including the Welcome Message, bug reporting flow, and Prompt Options.