Skip to content

Commit 776e73a

Browse files
authored
Merge pull request #40 from misaon/patch-1
Add translate option to 'files' label
2 parents 59ee1d2 + db942d0 commit 776e73a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

bootstrap.file-input.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,11 @@ $.fn.bootstrapFileInput = function() {
100100
// Remove any previous file names
101101
$(this).parent().next('.file-input-name').remove();
102102
if (!!$(this).prop('files') && $(this).prop('files').length > 1) {
103-
fileName = $(this)[0].files.length+' files';
103+
var filesLabel = $(this).data('files-label');
104+
if (!filesLabel) {
105+
filesLabel = 'files';
106+
}
107+
fileName = $(this)[0].files.length+' '+filesLabel;
104108
}
105109
else {
106110
fileName = fileName.substring(fileName.lastIndexOf('\\') + 1, fileName.length);

0 commit comments

Comments
 (0)