HomeDocumentationAPI Reference
Getting StartedAPI ReferenceBug ReportingCrash ReportingAPMHelp Center

SDK Locale for React Native

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 React Native 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.

import Instabug, { Locale } from 'instabug-reactnative';

Instabug.setLocale(Locale.french);

Here are the possible locale values.

Locale.arabic
Locale.azerbaijani
Locale.chineseSimplified
Locale.chineseTraditional
Locale.czech
Locale.danish
Locale.dutch
Locale.english
Locale.french
Locale.german
Locale.italian
Locale.japanese
Locale.polish
Locale.portugueseBrazil
Locale.romanian
Locale.russian
Locale.spanish
Locale.swedish
Locale.turkish
Locale.korean

πŸ“˜

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("Please enter a correct email address", StringKey.invalidEmailMessage);

Here are the possible key values.

StringKey.addAttachmentButtonTitleStringName
StringKey.addExtraScreenshot
StringKey.addImageFromGallery
StringKey.addVideoMessage
StringKey.addVoiceMessage
StringKey.audio
StringKey.audioRecordingPermissionDeniedMessage
StringKey.audioRecordingPermissionDeniedTitle
StringKey.cancelButtonText
StringKey.collectingDataText
StringKey.commentFieldHintForBugReport
StringKey.commentFieldHintForFeedback
StringKey.commentFieldHintForQuestion
StringKey.conversationsHeaderTitle
StringKey.conversationTextFieldHint
StringKey.discardAlertDiscard
StringKey.discardAlertStay
StringKey.discardAlertMessage
StringKey.discardAlertTitle
StringKey.edgeSwipeStartHint
StringKey.emailFieldHint
StringKey.image
StringKey.insufficientContentMessage
StringKey.insufficientContentTitle
StringKey.invalidEmailMessage
StringKey.invalidEmailTitle
StringKey.invocationHeader
StringKey.messagesNotification
StringKey.messagesNotificationAndOthers
StringKey.microphonePermissionAlertSettingsButtonText
StringKey.okButtonText
StringKey.recordingMessageToHoldText
StringKey.recordingMessageToReleaseText
StringKey.reportBug
StringKey.reportBugDescription
StringKey.reportFeedback
StringKey.reportFeedbackDescription
StringKey.reportQuestion
StringKey.reportQuestionDescription
StringKey.reportReproStepsDisclaimerBody
StringKey.reportReproStepsDisclaimerLink
StringKey.reproStepsListDescription
StringKey.reproStepsListEmptyStateDescription
StringKey.reproStepsListHeader
StringKey.reproStepsListItemNumberingTitle
StringKey.reproStepsProgressDialogBody
StringKey.requestFeatureDescription
StringKey.screenRecording
StringKey.screenshotHeaderTitle
StringKey.shakeHint
StringKey.startAlertText
StringKey.surveysStoreRatingThanksSubtitle
StringKey.surveysStoreRatingThanksTitle
StringKey.swipeHint
StringKey.team
StringKey.thankYouAlertText
StringKey.thankYouText
StringKey.videoPressRecord
StringKey.welcomeMessageBetaFinishStepContent
StringKey.welcomeMessageBetaFinishStepTitle
StringKey.welcomeMessageBetaHowToReportStepContent
StringKey.welcomeMessageBetaHowToReportStepTitle
StringKey.welcomeMessageBetaWelcomeStepContent
StringKey.welcomeMessageBetaWelcomeStepTitle
StringKey.welcomeMessageLiveWelcomeStepContent
StringKey.welcomeMessageLiveWelcomeStepTitle

What’s Next

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.