Rank: Advanced Member
Groups: Member, Administration Joined: 8/2/2003(UTC) Posts: 876
Thanks: 2 times Was thanked: 27 time(s) in 27 post(s)
|
Hi Peter, ActiveX control has its own default values within the .ocx file. They are the same as in the en.js file. However, they are not automatically loaded from the en.js file - if you change the default texts, you have to apply the en.js explicitly. In fact, the uploader.set(en_localization) line is a shortcode for a manual modification of all text strings. The en_localization object is a JSON with all text related params, so it is the same as if you create the uploader like this: Code:var upldr = $au.uploader(
// ...
addFilesProgressDialog: {
text: "Adding files to upload list..."
},
commonDialog: {
cancelButtonText: "Cancel",
okButtonText: "OK"
},
descriptionEditor: {
cancelButtonText: "Cancel",
saveButtonText: "Save"
},
imagePreviewWindow: {
closePreviewTooltip: "Click to close"
},
messages: {
cannotReadFile: "Cannot read file: {0}.",
dimensionsTooLarge: "Dimensions of '{0}' are too large, the file wasn't added. Maximum allowed image dimensions are {1}x{2} pixels.",
dimensionsTooSmall: "Dimensions of '{0}' are too small, the file wasn't added. Minimum allowed image dimensions are {1}x{2} pixels.",
fileNameNotAllowed: "The file '{0}' cannot be added. This file has inadmissible name.",
fileSizeTooSmall: "Size of '{0}' is too small to be added. Minimum allowed size is {1}.",
filesNotAdded: "{0} files were not added due to restrictions of the site.",
maxFileCountExceeded: "Not all files were added. You allowed to upload no more than {0} file(s).",
maxFileSizeExceeded: "Size of '{0}' is too large to be added. Maximum allowed size is {1}.",
maxTotalFileSizeExceeded: "Not all files were added. Maximum total file size ({0}) was exceeded.",
previewNotAvailable: "Preview is not available",
tooFewFiles: "At least {0} files should be selected to start upload."
},
// etc
);
I have just tried to apply the following settings: Code:
// ...
restrictions: {
maxFileSize: 1000,
},
messages: {
maxFileSizeExceeded: "Something '[name]' cannot be selected. This file size exceeds the limit.",
},
// ...
Whenever I try to select a file, it shows the Something '1.jpg' cannot be selected. This file size exceeds the limit.. So if you still cannot change the text, please post here a full snippet with params so that I could try to reproduce the problem.
|