Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Translations in p-fileupload #8630


User avatar
0
ipservant created

Hello,

We are trying to translate the "Choose" label in p-fileupload with the l() function, can you please advise how to do that properly? Thanks in advance!

<div class="uploadArea">
                            <!--<img src="{{iDfamilyImage}}" width="200" height="200" class="img-thumbnail img-rounded" />-->
                            <p-fileUpload multiple="true"
                                          id="DefaultFileUploadFileInput"
                                          name="DefaultFileUploadFileInput[]"
                                          [url]="uploadUrl"
                                          accept=".tiff,.jpeg,.jpg,.tif,.png"
                                          showUploadButton="false"
                                          showCancelButton="false"
                                          maxFileSize="16000000"
                                          (onUpload)="onUpload($event)"
                                          (onError)="onError($event)"
                                          (onBeforeUpload)="onBeforeUpload($event)"
                                          (onBeforeSend)="onBeforeSend($event)"
                                          dragDropSupport="true"
                                          auto="true">
                            </p-fileUpload>
                        </div>
                        
                        ```

2 Answer(s)
  • User Avatar
    1
    maliming created
    Support Team

    Try use label attribute.

    <p:fileUpload label=l('choose') .../>
    

    https://primefaces.github.io/primefaces/8_0/#/components/fileupload?id=attributes

  • User Avatar
    0
    ipservant created

    Thank you, that worked!