You can simplify this down to `return i18n.getSupportLanguages().indexOf(locale) !== -1`