Global Translation for OK, Cancel and Done Texts


#1

I would like to know if there is a way to set global translations for the properties of okText, cancelText and doneText of ion-select and ion-datetime.

My code is similar to the one below:

interface IonicConfig {
	backButtonText: string;
	cancelText: string;
	dayNames: string;
	dayShortNames: string;
	doneText: string;
	monthNames: string;
	monthShortNames: string;
	okText: string;
}

...

constructor(
	private config: Config, 
	private translationService: TranslationService,
	...
) { ... }

...

private someMethod() {
	let configData: IonicConfig = {
		backButtonText: this.translationService.translate(...),
		cancelText: this.translationService.translate(...),
		dayNames: this.translationService.translate(...),
		dayShortNames: this.translationService.translate(...),
		doneText: this.translationService.translate(...),
		monthNames: this.translationService.translate(...),
		monthShortNames: this.translationService.translate(...),
		okText: this.translationService.translate(...),
	};

	Object.keys(configData).forEach(key => {
		let value = configData[key];
		this.config.set(key, value);
	});
}

Looking at the config docs I see that the only property that I use that is in the docs is backButtonText.

On the other hand, the properties dayNames, dayShortNames, monthNames and monthShortNames are not in the config docs, but they work, so I think some properties are missing in the docs (these can be seen in the ion-datetime docs).

The properties cancelText, doneText and okText don’t work though. I expected them to work because they have the same names of properties of ion-select and ion-datetime, just like dayNames and so on, and having to define them per component is impractical IMO.

So either these properties have different names or they can’t be configured globally for the moment. If the later, is there some estimated time to implement it, to make them work globally for ion-select and ion-datetime?