#162 Fixed wrong condition
#162 Added i18n; improved function names