GrampsLocale: Correct setting GrampsLocale.languages

Test only first 5 or first 2 characters of the language id against the
list of available translations.

Thanks to Tim Lyons for exposing the error.

git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@21326 4ae1f11a-8b86-4847-b8af-ab372f36d1fd