Refactor work with RTL languages in word search list and history list