From 63691ce4536cbff24330e6d268343e343ee806fa Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Tue, 21 Aug 2018 16:07:28 +0200 Subject: Internationalization support for built-in components. --- src/main/kotlin/pl/treksoft/kvision/form/upload/UploadInput.kt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/main/kotlin/pl/treksoft/kvision/form/upload') diff --git a/src/main/kotlin/pl/treksoft/kvision/form/upload/UploadInput.kt b/src/main/kotlin/pl/treksoft/kvision/form/upload/UploadInput.kt index 90dd21c4..0f8aaf4a 100644 --- a/src/main/kotlin/pl/treksoft/kvision/form/upload/UploadInput.kt +++ b/src/main/kotlin/pl/treksoft/kvision/form/upload/UploadInput.kt @@ -29,6 +29,7 @@ import pl.treksoft.kvision.core.StringPair import pl.treksoft.kvision.core.Widget import pl.treksoft.kvision.form.FormInput import pl.treksoft.kvision.form.InputSize +import pl.treksoft.kvision.i18n.I18n import pl.treksoft.kvision.types.KFile import pl.treksoft.kvision.utils.obj @@ -279,6 +280,7 @@ open class UploadInput(uploadUrl: String? = null, multiple: Boolean = false, cla } private fun getSettingsObj(): dynamic { + val language = I18n.language return obj { this.uploadUrl = uploadUrl this.uploadExtraData = uploadExtraData ?: undefined @@ -295,6 +297,7 @@ open class UploadInput(uploadUrl: String? = null, multiple: Boolean = false, cla this.allowedFileTypes = allowedFileTypes?.toTypedArray() this.allowedFileExtensions = allowedFileExtensions?.toTypedArray() this.dropZoneEnabled = dropZoneEnabled + this.language = language } } -- cgit