Class ChartI18N

java.lang.Object
com.arbergashi.charts.util.ChartI18N

public final class ChartI18N extends Object
Internationalization (public API) facade.

Note: the underlying bundle/fallback logic is implemented in ChartAssets. This class exists to provide a convenient developer experience.

Since:
2026-01-01
Version:
1.0.0
Author:
Arber Gashi
  • Method Details

    • getString

      public static String getString(String key)
      Returns the localized string for the current default locale.
    • getString

      public static String getString(String key, Locale locale)
    • getIconPath

      public static String getIconPath(String rendererKey)
      Specialized helper for SVG icon keys.
    • format

      public static String format(String key, Object... args)
    • format

      public static String format(String key, Locale locale, Object... args)
    • flushCache

      public static void flushCache()
      Cache flush helper. Delegates to ChartAssets for consistent reload/theme-switch behavior.
    • setDefaultLocale

      public static void setDefaultLocale(Locale locale)
      Sets a framework-wide default locale for i18n resolution.

      When set, this locale is used by getString(String) and format(String, Object...) unless a locale is provided explicitly.

      Parameters:
      locale - default locale to use (null resets to JVM default)
    • getDefaultLocale

      public static Locale getDefaultLocale()
      Returns the framework default locale override, or null when not set.
      Returns:
      the explicit default locale or null