Affects Version/s: None
Fix Version/s: QualifiedToSchedule
Component/s: Web UI
Implement the solution propose in TL-285:
1. persisting the list of supported locales on Web UI’s contribution to the configuration service, as well as the default locale
2. load this data on index.jsp into Web UI’s global config object (TL-287,
NXP-25512), let’s say into Nuxeo.UI.config.locales = ['en', 'fr', 'pt-PT', 'pt-BR', ...] and Nuxeo.UI.config.defaultLocale = 'en'
3. introducing a new locale resolver that would read the locale list from global config
The resolver will receive the target locale and the locale list, and know what language to load. The loading strategy consists of:
1. Check if the selected locale exists as is in the locale list
2. If not, split by - the target locale, with format <language-code>-<country-code>, as a means to separate the language from the country code
3. use the language-code to find a list of locales for the given country-code
4. if none is found, select the first for that language-code, by order
5. if no entry was found to the language-code, select the default locale or, it not defined, en.