You get your languages from BackendLanguage::getActiveLanguages(). This returns an array of strings. Recasting it isn't necessary imo.