fixed detect locale

Signed-off-by: Konctantin <gawrilyako@gmail.com>