SDK Locale

This section covers how to change the language of the SDK as well as the content of all the messages that your users will see.

Setting the Locale

The SDK will automatically use the device's current locale, however, you can override it with the following method.

//iOS
Instabug.SetLocale(IBGLocale.English);

//Android
new Instabug.Builder(this, "YOUR_ANDROID_TOKEN")
            .SetInvocationEvent(InstabugInvocationEvent.Shake)
            .SetLocale(Locale.French)
						.Build();

Here are the possible locale values.

//iOS
IBGLocale.Arabic,
IBGLocale.ChineseSimplified
IBGLocale.ChineseTaiwan
IBGLocale.ChineseTraditional
IBGLocale.Czech
IBGLocale.Danish
IBGLocale.English
IBGLocale.French
IBGLocale.German
IBGLocale.Italian
IBGLocale.Japanese
IBGLocale.Korean
IBGLocale.Norwegian
IBGLocale.Polish
IBGLocale.Portugese
IBGLocale.PortugueseBrazil
IBGLocale.Russian
IBGLocale.Slovak
IBGLocale.Spanish
IBGLocale.Swedish
IBGLocale.Turkish

//Android
Locale.Arabic
Locale.ChineseSimplified
Locale.ChineseTraditional
Locale.Czech
Locale.Danish
Locale.English
Locale.French
Locale.German
Locale.Italian
Locale.Japanese
Locale.Polish
Locale.PortugueseBrazil
Locale.Russian
Locale.Spanish
Locale.Swedish
Locale.Turkish

📘

Dashboard Language

At the moment, the Instabug dashboard only supports English. Changing the SDK locale will not have an impact on the dashboard.

String Values

You can also override each string shown in the SDK individually to provide your own localization.

//iOS
Instabug.SetValue("Report a bug", IBGString.ReportBug);

//Android
InstabugCustomTextPlaceHolder placeHolder = new InstabugCustomTextPlaceHolder();
placeHolder.Set(InstabugCustomTextPlaceHolder.Key.ReportBug, "Report a new bug");
Instabug.SetCustomTextPlaceHolders(placeHolder);

Here are the possible key values.

//iOS
IBGString.ShakeHint
IBGString.SwipeHint
IBGString.EdgeSwipeStartHint
IBGString.StartAlertText
IBGString.InvalidEmailMessage
IBGString.InvalidEmailTitle
IBGString.InvalidCommentMessage
IBGString.InvalidCommentTitle
IBGString.InvocationHeader
IBGString.ReportQuestion
IBGString.ReportBug
IBGString.ReportFeedback
IBGString.EmailFieldHint
IBGString.CommentFieldHintForBugReport
IBGString.CommentFieldHintForFeedback
IBGString.AddScreenRecordingMessage
IBGString.AddImageFromGallery
IBGString.AddExtraScreenshot
IBGString.AudioRecordingPermissionDeniedTitle
IBGString.AudioRecordingPermissionDeniedMessage
IBGString.ScreenRecordingPermissionDeniedMessage
IBGString.MicrophonePermissionAlertSettingsButtonTitle
IBGString.MicrophonePermissionAlertLaterButtonTitle
IBGString.ChatsHeaderTitle
IBGString.Team
IBGString.RecordingMessageToHoldText
IBGString.RecordingMessageToReleaseText
IBGString.MessagesNotification
IBGString.MessagesNotificationAndOthers
IBGString.ScreenshotHeaderTitle
IBGString.OkButtonTitle
IBGString.CancelButtonTitle
IBGString.ThankYouText
IBGString.ThankYouAlertText
IBGString.Audio
IBGString.ScreenRecording
IBGString.Image
IBGString.SurveyEnterYourAnswerPlaceholder
IBGString.SurveyNoAnswerTitle
IBGString.SurveyNoAnswerMessage
IBGString.SurveySubmitTitle
IBGString.VideoPressRecordTitle
IBGString.LowDiskStorageTitle
IBGString.LowDiskStorageMessage
  
//Android
InstabugCustomTextPlaceHolder.Key.AddExtraScreenshot
InstabugCustomTextPlaceHolder.Key.AddImageFromGallery
InstabugCustomTextPlaceHolder.Key.AddVideo
InstabugCustomTextPlaceHolder.Key.AudioRecordingPermissionDenied
InstabugCustomTextPlaceHolder.Key.CommentFieldHintForBugReport
InstabugCustomTextPlaceHolder.Key.CommentFieldHintForFeedback
InstabugCustomTextPlaceHolder.Key.ConversationsListTitle
InstabugCustomTextPlaceHolder.Key.ConversationTextFieldHint
InstabugCustomTextPlaceHolder.Key.EmailFieldHint
InstabugCustomTextPlaceHolder.Key.FeedbackReportHeader
InstabugCustomTextPlaceHolder.Key.InvalidCommentMessage
InstabugCustomTextPlaceHolder.Key.InvalidEmailMessage
InstabugCustomTextPlaceHolder.Key.InvocationHeader
InstabugCustomTextPlaceHolder.Key.ReportBug
InstabugCustomTextPlaceHolder.Key.ReportFeedback InstabugCustomTextPlaceHolder.Key.ReportQuestion
InstabugCustomTextPlaceHolder.Key.ReportSuccessfullySent
InstabugCustomTextPlaceHolder.Key.ShakeHint
InstabugCustomTextPlaceHolder.Key.SuccessDialogHeader
InstabugCustomTextPlaceHolder.Key.SwipeHint

What’s Next

The locale reflects on all aspects of the SDK. The language might be different, but you'll want to welcome your user either way. The bug reporting and prompt options will also change.