Skip to content

Localization

To change the standard component messages or any text, specify the language attribute (see locale in settings and attributes) to be used. You can select one from existing locales or add your custom one. See the following example:

const element = document.createElement('document-reader');

element.translations = {
   en: {
      fromCamera: 'Use your camera',
   },
};

body.append(element);

Note: To see the changes applied, don't forget to set the desired language to the locale attribute.

<document-reader locale="en"></document-reader>

Predefined Localized Labels

See the following table with localized labels and their default message values in English.

Label Default message in en locale Related components
done Done! document-reader, camera-snapshot
fileCorrupt This file is corrupt or not supported document-reader, camera-snapshot
somethingWentWrong Something went wrong document-reader, camera-snapshot
tryAgain Try again document-reader, camera-snapshot
cameraUnavailable Camera unavailable! document-reader, camera-snapshot
preparingCamera Preparing the camera... document-reader, camera-snapshot
noCameraAvailable No camera available document-reader, camera-snapshot
incorrectCameraId No camera with the specified ID found. document-reader, camera-snapshot
gallery Gallery document-reader, camera-snapshot
files Files document-reader, camera-snapshot
camera Camera document-reader, camera-snapshot
largeFile This file is too large to be uploaded document-reader
versionNotSupported Your browser version is not supported document-reader
httpNotSupported HTTPS is not used document-reader
insecurePageContext Insecure page context document-reader
timeout Timeout document-reader
preparingService Preparing the service... document-reader
placeDocumentIntoFrame Fit the document into the frame document-reader
noFocus No camera focus document-reader
moveCloser Move closer document-reader
glaresOnDocument Avoid glare on the document document-reader
holdDocumentStraight Hold the document straight document-reader
documentProcessing Document processing... document-reader
flipDocument Flip the document document-reader
keepDeviceStill Hold the device still document-reader
positionDocumentCenter Position the document in the center camera-snapshot
uploadPhoto Upload a photo camera-snapshot
switchToMobile Switch to mobile document-reader
openPhoneCamera Open the camera on your mobile device, scan the QR code, and follow the link document-reader
pleaseWait Please wait... document-reader
mobileDevice Mobile device document-reader
verifyYourIdentity Verify your identity document document-reader
fromCameraFilesMobileDesktop Capture a document using the computer’s camera, or upload it from files, or scan it on a mobile device document-reader
fromCameraGalleryMobile Capture a document using the computer’s camera, or upload it from gallery document-reader
badLicense The license cannot be found or has expired document-reader
fromCameraFilesDesktop Capture a document using the computer’s camera, or upload it from files document-reader
fromCameraMobileDesktop Capture a document using the computer’s camera, or scan it on a mobile device document-reader
fromFilesMobileDesktop Upload a document from files, or scan it on a mobile device document-reader
fromCameraDesktop Use the computer's camera to capture a document document-reader
fromFilesDesktop Pick a document from the files and upload it document-reader
fromMobileDesktop Use your mobile camera to capture a document document-reader
fromGalleryMobile Pick a document from the gallery and upload it document-reader
returnToComputer Return to the computer document-reader
documentCaptured Your document has been captured document-reader

Next Steps