Support more locale code forms in language search

Currently, you can search for a locale code in the language search field in the form of LL_RR#Scrp. As per the documentation (e.g., the one for JSON format), the locale codes can be defined in more ways, for example LL-RR#Scrp.
it would be good if the language search field would work with all locale code forms which can be used in the different file formats.