F
Filamentβ€’10mo ago
Wirkhof

"Drag & Drop your files or Browse" translation issue

I haven't found a setting for translating the Filepond's text "Drag & Drop your files or Browse" anywhere in lang/vendor/filament-forms/de/components.php . I see only translations for Editor there. How to translate this text that appears on every upload field?
Solution:
OK, I have played with the css and it is working with :before and then hiding the label, but it would be cool that languages like Japanese or Korean or even Greek and Lithuanian, Slovak, Croatian would be included or at least there would be an option to manually translate things in some config files. Basically all that are already available in Filepond https://github.com/pqina/filepond/tree/master/locale
GitHub
filepond/locale at master Β· pqina/filepond
🌊 A flexible and fun JavaScript file upload library - pqina/filepond
Jump to solution
13 Replies
Wirkhof
WirkhofOPβ€’10mo ago
It's not possible?
awcodes
awcodesβ€’10mo ago
Those translations are part of the js. They won’t be in the language files. de is included in the build for the component. So I would expect it to work if your language is setup correctly in Laravel.
Wirkhof
WirkhofOPβ€’10mo ago
Where is the js file translation located in Filament? It should be labelIdle according to this https://github.com/pqina/filepond/issues/39
GitHub
Translations Β· Issue #39 Β· pqina/filepond
Missing feature. I think using options for this problem is scary.
awcodes
awcodesβ€’10mo ago
GitHub
filament/packages/forms/resources/js/components/file-upload.js at 3...
A collection of beautiful full-stack components for Laravel. The perfect starting point for your next app. Using Livewire, Alpine.js and Tailwind CSS. - filamentphp/filament
awcodes
awcodesβ€’10mo ago
At the bottom of the file
Wirkhof
WirkhofOPβ€’10mo ago
great, so my locale is missing it seems
const locales = {
ar,
cs,
da,
de,
en,
es,
fa,
fi,
fr,
hu,
id,
it,
nl,
no,
pl,
pt_BR,
pt_PT,
ro,
ru,
sv,
tr,
uk,
vi,
zh_CN,
zh_TW,
}
const locales = {
ar,
cs,
da,
de,
en,
es,
fa,
fi,
fr,
hu,
id,
it,
nl,
no,
pl,
pt_BR,
pt_PT,
ro,
ru,
sv,
tr,
uk,
vi,
zh_CN,
zh_TW,
}
exactly I have changed it to de and it works : Dateien ablegen oder ... Japanese and Korean are missing as well πŸ˜‰ What is the best approach to fix it? Do you know where is the location of this file: import no from "filepond/locale/no_nb"; filepond/locale/no_nb I can't find it in vendor folder Do you know about any way how to make it work. Perhaps some dirty css trick to swap the upload field text for フゑむルをドラッグ をンド ドロップするか、参照します in theme.css file or something like that?
Dennis Koch
Dennis Kochβ€’10mo ago
Make a PR with the missing ones
Wirkhof
WirkhofOPβ€’10mo ago
Is there meanwhile any dirty trick how can I overwrite it manually? Via css or js.
Dennis Koch
Dennis Kochβ€’10mo ago
You could try via ::after pseudo-element
Wirkhof
WirkhofOPβ€’10mo ago
in theme.css ?
Dennis Koch
Dennis Kochβ€’10mo ago
If you have one, yes.
Solution
Wirkhof
Wirkhofβ€’10mo ago
OK, I have played with the css and it is working with :before and then hiding the label, but it would be cool that languages like Japanese or Korean or even Greek and Lithuanian, Slovak, Croatian would be included or at least there would be an option to manually translate things in some config files. Basically all that are already available in Filepond https://github.com/pqina/filepond/tree/master/locale
GitHub
filepond/locale at master Β· pqina/filepond
🌊 A flexible and fun JavaScript file upload library - pqina/filepond
Dennis Koch
Dennis Kochβ€’10mo ago
but it would be cool that languages like Japanese or Korean or even Greek and Lithuanian, Slovak, Croatian would be included
You can open a PR to include them any time.
Want results from more Discord servers?
Add your server