Translate editor modal
Translate editor modal
![cmplus](https://secure.gravatar.com/avatar/1a31d86533ec8c2d35a9ddd8497210ed/?default=https%3A%2F%2Fvanillicon.com%2F1a31d86533ec8c2d35a9ddd8497210ed_200.png&rating=g&size=120)
How do I translate file addition entries in the modal window? for example No file, Drag and drop a file here to upload
How do I translate file addition entries in the modal window? for example No file, Drag and drop a file here to upload
Answers
You are referring to the file upload text only. Hence I would recommend you take a look at the docs:
https://editor.datatables.net/reference/field/uploadMany
You can specify various texts as you can see there. These can of course be in any language.
My solution for this:
And more Editor translations in case the user language is German and not English. For English I stick to the built-in defaults.
@rf1234 Thanks for the reply, I inserted the entries in the language file which currently translates everything for me but it doesn't translate those entries for me, and it doesn't work, I tried with your suggestion and it doesn't translate, they remain in English
I don't see you updating the Editor defaults and "i18n". You need to do this:
Take a close look at what I posted please.
This will probably not work: no reference to the Editor defaults and no reference to "i18n" either.
I think there is actually a gap in the support for the language information from a file here. The upload field type gets it's translation settings from its configuration object as rf1234 showed. It did not currently have an option to take the translations from the main
i18n
object, which in retrospect is a flaw. Apologies, that is something I'll need to add in.Allan
where should I add that string?
Is it likely that it doesn't work because I use yajra datatables with the editor?, currently I have everything translated correctly, that's all I'm missing, the items that are in the upload I don't understand the problem
and I recall the translation with
"language" is DataTables. Editor wants "i18n".
You need to put the translation for the
upload
into the field's configuration object.In the above I've got the strings for
clearText
andnoImageText
set. As rf1234 pointed out, there are other string options forupload
which can be set as well.Allan