Skip to content

OCR Get Available Languages

Type: ocr-get-languages  ·  Package: OCR Activities v1.2.5  ·  Output: List<string>

Returns the list of Tesseract language codes available in the package (e.g. eng, spa). Useful to check, before processing, that the language you need is installed.

Checks the language files (.traineddata) that the package brings on the robot’s machine and returns their codes in alphabetical order. The package includes eng (English) and spa (Spanish). It does not run OCR and is instant.

None.

None.

Returns a List of language codes (string), for example ["eng", "spa"]. If the package’s language folder does not exist on the machine (incomplete installation), it returns an empty list.

OCR Get Available Languages → output: languages
If condition = !languages.Contains("spa")
└─ then:
Throw message = "The 'spa' language is not available for OCR on this robot"

This activity practically never fails: in the worst case it returns an empty list.