I created file upload function using lightning-file-upload. Its buttons are showed "uplopadFiles" and "ordrop files". I would like to change those to proper Japanese. Could you tell me how to? I found some post to change the button label for <lightning:input type=“file”>. Is it possible to change for < lightning-file-upload> as well?
2 Answers
the documentation indicates how to change the label
The button label is "Upload Files" by default. Use the label attribute to add a descriptive label above the Upload Files button.
this is of course only for what is displayed above the button, I don't believe there are other modifiable attributes though
-
You can use Style Hooks to change many of the colors and things for most components. The docs don't reflect all the possibilities as of yet.– sfdcfoxMay 14, 2021 at 2:36
-
-
1I just thought you meant no further customizations at all. You're right though, part of it can't be customized at all.– sfdcfoxMay 14, 2021 at 4:05
As you mentioned there are other approaches to change label which will require moving from lightning-file-upload to lightning-input. Like the one mentioned in the following blogs or similar questions:-
However, it is recommended to use lightning-file-upload as it provides the functionality without much of server side handling part. Use of Lightning-input will require lot of custom apex code. Hope in future releases , salesforce provides flexibility to change "Upload Files" button.