org.klomp.snark.standalone

## Class ConfigUIHelper

- java.lang.Object
- - org.klomp.snark.standalone.ConfigUIHelper

-     public class ConfigUIHelper
      extends Object

  Configuration helper for I2PSnark standalone application user interface.

  This class provides language selection functionality for the I2PSnark web interface when running in standalone mode (with its own app context). It is a simplified version of the router console's ConfigUIHelper, adapted specifically for I2PSnark's needs.

  Key features:

  - Generates HTML select dropdown for language selection
  - Supports ISO 639-1 and ISO 639-2 language codes
  - Performs intelligent language matching with fallback logic
  - Uses I2PSnark-specific message bundles for translations

  Note: This is a standalone-only helper that does not extend HelperBase and uses static methods since I2PSnark runs with its own application context separate from the main router console.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ConfigUIHelper()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static String` | `getLangSettings(I2PAppContext ctx)` Generates HTML select dropdown for language selection in I2PSnark standalone mode.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ConfigUIHelper

          public ConfigUIHelper()

  - ### Method Detail

    - #### getLangSettings

          public static String getLangSettings(I2PAppContext ctx)

      Generates HTML select dropdown for language selection in I2PSnark standalone mode.

      Creates a <select> element containing all available languages with their display names. The current language is pre-selected based on the I2P app context configuration. Unlike the router console version, this generates a dropdown rather than radio buttons with flags.

      Performs intelligent language matching:

      1. First attempts to match the full language+country code (e.g., "en_US")
      2. Falls back to language-only code (e.g., "en")
      3. Defaults to English if no match is found

      The "Debug: Find untagged strings" option is hidden unless advanced mode is enabled.

      Parameters:
        `ctx` - the I2P application context for retrieving current language settings
      Returns:
        HTML string containing a complete language selection dropdown