Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-14632

Make easier to set a locale not supported by Java

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • None
    • 9.6
    • None
    • Unknown

    Description

      Since XWIKI-13567 the admin UI only allow choosing an officially supported Locale (plus a few more since XWIKI-14608) but if you need to add support for a new Locale...

      The list of the locales officially supported by Java is actually very small and does not even include all the locales supported by XWiki (which leaded to XWIKI-14608).

      You have to either:

      • use the object editor on XWikiPreference page
      • add the locale in WEB-INF/locales.txt
      • add support for this Locale at Java level

      What would be really nice to fix this would be to add ICU4J which adds support for more that 700 locales.

      See http://site.icu-project.org/ and http://userguide.icu-project.org/icu4j-locale-service-provider.

      But this required a refactoring of the current Locales picker which does not scale very well.

      Note that it would not fully cover this issue title but we could decide that after including support for 700+ locales if someone want to add support for Locale not listed that requires to implement proper Java support for that Locale which is perfectly doable for something that would become a pretty advanced use case (see https://docs.oracle.com/javase/tutorial/i18n/locale/create.html).

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              tmortagne Thomas Mortagne
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: