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.

Language

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

//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

String Values

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

//iOS
Instabug.SetString("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.TalkToUs
IBGString.ReportBug
IBGString.ReportFeedback
IBGString.EmailFieldHint
IBGString.CommentFieldHintForBugReport
IBGString.CommentFieldHintForFeedback
IBGString.AddScreenRecordingMessage
IBGString.AddVoiceMessage
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.AddVoiceMessage
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.ReportSuccessfullySent
InstabugCustomTextPlaceHolder.Key.ShakeHint
InstabugCustomTextPlaceHolder.Key.StartChats
InstabugCustomTextPlaceHolder.Key.SuccessDialogHeader
InstabugCustomTextPlaceHolder.Key.SwipeHint