Package zendesk.core

Class ZendeskLocaleConverter



  • public class ZendeskLocaleConverter
    extends java.lang.Object
    This class is responsible for mapping between Java locales and the representations of locales that Help Center expects.

    There are two large classes of remappings that need to be done:

    1. Mapping of legacy Java locales (iw, in, ji) to their modern counterparts (he, id, yi)
    2. Mapping of locales in Help Center that are different to Java (nb -> no)

    Created by Zendesk on 12/05/2016.

    See Also:
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String toHelpCenterLocaleString(java.util.Locale locale)
      Converts the specified locale into a string version which Help Center expects.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ZendeskLocaleConverter

        public ZendeskLocaleConverter()
    • Method Detail

      • toHelpCenterLocaleString

        public java.lang.String toHelpCenterLocaleString(java.util.Locale locale)
        Converts the specified locale into a string version which Help Center expects.
        Parameters:
        locale - The locale to convert. If it is null, or if its language is null, then the default locale will be used
        Returns:
        The string representation of the Locale.