@rekurt/openkline - v0.2.0
    Preparing search index...

    Interface I18n

    The runtime i18n bundle the chart uses internally: translated string lookup (t) plus locale-aware number/date/percent formatters bound to the configured locale. Built by createI18n.

    interface I18n {
        locale: string | undefined;
        messages: Messages;
        price: NumberFormatFn;
        volume: NumberFormatFn;
        date(timestamp: number, resolution: string): string;
        percent(value: number): string;
        t(key: keyof Messages): string;
    }
    Index

    Properties

    locale: string | undefined

    The configured BCP-47 locale, or undefined for the runtime default.

    messages: Messages

    The resolved messages (defaults merged with the host's overrides).

    Format a price for this locale (auto-precision).

    Format a volume for this locale (compact K/M/B).

    Methods

    • Format a Unix-seconds timestamp for this locale at the given resolution.

      Parameters

      • timestamp: number
      • resolution: string

      Returns string

    • Format a signed percentage for this locale.

      Parameters

      • value: number

      Returns string