AjaxUploader ships with 20 built-in locales — English, Spanish, French, German, Japanese, Simplified Chinese, Brazilian Portuguese, Italian, Dutch, Russian, Polish, Turkish, Korean, Czech, Vietnamese, Thai, Indonesian, Hindi, plus Arabic and Hebrew with right-to-left support. Pick a language below — buttons, drag-drop hints, status text, error messages, and the media-capture modals all switch instantly. Add your own locale with one call to AjaxUploader.registerLocale().
What changes: the file-picker button label, the drag-drop instruction, the queue status badges (uploading / complete / failed), validation error messages, and the modal titles for image editor / webcam / screen / audio capture. Custom options.buttonText always wins — i18n only fills in defaults.
Switch locale globally
AjaxUploader.setLocale('fr');
AjaxUploader.create('#uploader', { uploadUrl: '/upload' });
Right-to-left support
Arabic (ar) and Hebrew (he) carry an RTL hint. Read it with getLocaleDir() and flip the container's dir attribute — all icons, progress bars, and the queue layout follow:
AjaxUploader.setLocale('ar');
container.setAttribute('dir', AjaxUploader.getLocaleDir()); // 'rtl'
AjaxUploader.create(container, { uploadUrl: '/upload' });
Register a custom locale
Pass a partial dictionary — missing keys fall back to English transparently:
AjaxUploader.registerLocale('sv', {
selectFiles: 'Välj filer',
dragDrop: 'Dra och släpp filer här',
upload: 'Ladda upp',
cancel: 'Avbryt',
complete: 'Klar',
failed: 'Misslyckades',
fileTooLarge: 'Filen "{name}" ({size}) överskrider maxstorleken {max}.'
// 30+ other keys fall back to English
});
AjaxUploader.setLocale('sv');
Translation key reference
Full key list with English defaults — translate only the ones you need:
// UI controls
selectFiles, dragDrop, dropHere, upload, browse,
cancel, remove, retry, pause, resume, clear,
// Status
uploading, complete, failed, cancelled, pending, remaining,
// Validation
maxFilesReached, fileTypeNotAllowed, fileTooLarge, fileTooSmall,
duplicateFile, mimeTypeNotAllowed,
imageTooWide, imageTooTall, imageTooNarrow, imageTooShort,
// Errors
networkError, uploadFailed, invalidResponse, chunkFailed,
// Stats
files, totalSize, speed, eta, of,
// Media capture
webcamPhotoTitle, webcamVideoTitle, screenCaptureTitle, audioCaptureTitle,
snap, record, stop, recording,
// Image editor
editorRotate, editorFlip, editorCrop, editorApply, editorSave, editorReset,
// URL import
importFromUrl, importingFrom
Interpolation
String values can include {name}-style placeholders that get filled in at render time:
AjaxUploader.registerLocale('en-pirate', {
fileTooLarge: 'Arrr, the file "{name}" ({size}) be larger than the limit of {max}!'
});