Frontend: Fix system locale detection.

The locale detection would crash if no OCR tools are available, or if
system locale cannot be determined (i.e. LANG env var is not set)
Merge pull request #320 from plietar/fix-locale-detection

Frontend: Fix system locale detection.