Adapt getLocaleByCode() to BFC 47

getLocaleByCode($code) accept codes not only like 'ru', but 'ru*' too (meaning 'ru_RU')