This seems wrong to me.  Do you not need to use `localeInfo.lang` and `localeInfo.direction` in both cases?