use proper LanguageTag fallback instead of dumb startsWith(), fdo#68714

A ca_ES@valencia (=> ca-ES-valencia) locale did not result in
'ca-valencia' UI being selected but 'ca' only instead.

Change-Id: Ifa405add2ff7b45e030b02af4338de195b457cb2
(cherry picked from commit 03e7a16fe2802160b8344058f225a57bdb9c59f5)