[issue 5440] fix rtl direction bug for full language codes

- fixes issue #5440 
- full language codes are represented as "ab-cd", whereas short ones are "ab"
- this code change only uses "ab" to determine the RTL/LTR direction