diff --git a/nativescript-imagepicker/index.d.ts b/nativescript-imagepicker/index.d.ts index b949cfd..3170e98 100644 --- a/nativescript-imagepicker/index.d.ts +++ b/nativescript-imagepicker/index.d.ts @@ -80,6 +80,21 @@ interface Options { */ mode?: string; + /** + * Set the text for the done button in iOS + */ + doneText?: string; + + /** + * Set the text for the cancel button in iOS + */ + cancelText?: string; + + /** + * Set the text for the albums button in iOS + */ + albumsText?: string; + android?: { /** * Provide a reason for permission request to access external storage on api levels above 23. diff --git a/nativescript-imagepicker/viewmodel.ios.ts b/nativescript-imagepicker/viewmodel.ios.ts index e13e46f..e25ba3e 100644 --- a/nativescript-imagepicker/viewmodel.ios.ts +++ b/nativescript-imagepicker/viewmodel.ios.ts @@ -70,15 +70,15 @@ export class ImagePicker extends data_observable.Observable { } get doneText(): string { - return "Done"; + return this._options && this._options.doneText ? this._options.doneText : "Done"; } get cancelText(): string { - return "Cancel"; + return this._options && this._options.cancelText ? this._options.cancelText : "Cancel"; } get albumsText(): string { - return "Albums"; + return this._options && this._options.albumsText ? this._options.albumsText : "Albums"; } get mode(): string {