Class LanguageField


  • public class LanguageField
    extends Field
    Represents a language field. The field may contain only valid language identifiers as used by the Guacamole web application for its translations. Language identifiers are defined by the filenames of the JSON files containing the translation.
    • Constructor Detail

      • LanguageField

        public LanguageField​(String name)
        Creates a new LanguageField with the given name.
        Parameters:
        name - The unique name to associate with this field.
    • Method Detail

      • parse

        public static String parse​(String language)
        Parses the given string into a language ID string. As any string may be a valid language ID as long as it has a corresponding translation, the only transformation currently performed by this function is to ensure that a blank language string is parsed into null.
        Parameters:
        language - The language string to parse, which may be null.
        Returns:
        The ID of the language corresponding to the given string, or null if if the given language string was null or blank.