XWIKI-9307: Add API to help convert a String to Locale
* add tests