Add a function to get the language from a locale string