GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • @maxgraph/core

This view

  • Original page
  • New address

GeezerVison is showing maxgraph.github.io — I18nProvider | @maxgraph/core

  • I18nProvider

Interface I18nProviderExperimental

The abstract interface for the I18n system. The actual implementation is configured in GlobalConfig.i18n.

subject to change or removal. The I18n system may be modified in the future without prior notice.

Since

0.17.0

interface I18nProvider {
    addResource(
        basename?: string | null,
        language?: string | null,
        callback?: Function | null,
    ): void;
    get(
        key?: string | null,
        params?: any[] | null,
        defaultValue?: string | null,
    ): string | null;
    isEnabled(): boolean;
}

Implemented by

  • NoOpI18n
  • TranslationsAsI18n
  • Defined in types.ts:1480
Index

Methods

addResource get isEnabled

Methods

addResource

  • addResource(
        basename?: string | null,
        language?: string | null,
        callback?: Function | null,
    ): void
    Experimental

    Load the translation file for the given basename and language.

    This is mainly used by the maxGraph built-in provider to bind to Translations.add.

    Parameters

    • Optionalbasename: string | null

      The basename for which the file should be loaded.

    • Optionallanguage: string | null

      The language for which the file should be loaded. Default is null.

    • Optionalcallback: Function | null

      Optional callback for asynchronous loading. Default is null.

    Returns void

    • Defined in types.ts:1507

get

  • get(
        key?: string | null,
        params?: any[] | null,
        defaultValue?: string | null,
    ): string | null
    Experimental

    Returns the value for the specified resource key.

    Parameters

    • Optionalkey: string | null

      String that represents the key of the resource to be returned.

    • Optionalparams: any[] | null

      Array of the values for the placeholders to be replaced with in the resulting string. The form of the placeholder is specific to each implementation.

    • OptionaldefaultValue: string | null

      Optional string that specifies the default return value.

    Returns string | null

    • Defined in types.ts:1492

isEnabled

  • isEnabled(): boolean
    Experimental

    Returns whether internationalization is enabled.

    Returns boolean

    • Defined in types.ts:1484

Settings

Member Visibility
  • Protected
  • Inherited
Theme

On This Page

Methods
addResourcegetisEnabled
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.