How to use @bentley/imodeljs-i18n - 1 common examples

To help you get started, we’ve selected a few @bentley/imodeljs-i18n examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github imodeljs / imodeljs / core / frontend / src / IModelApp.ts View on Github external
requestContext.enter();

    this._initialized = true;

    // Initialize basic application details before log messages are sent out
    this.sessionId = (opts.sessionId !== undefined) ? opts.sessionId : Guid.createValue();
    this._applicationId = (opts.applicationId !== undefined) ? opts.applicationId : "2686";  // Default to product id of iModel.js
    this._applicationVersion = (opts.applicationVersion !== undefined) ? opts.applicationVersion : (typeof BUILD_SEMVER !== "undefined" ? BUILD_SEMVER : "");
    this.authorizationClient = opts.authorizationClient;

    this._imodelClient = (opts.imodelClient !== undefined) ? opts.imodelClient : new IModelHubClient();

    this._setupRpcRequestContext();

    // get the localization system set up so registering tools works. At startup, the only namespace is the system namespace.
    this._i18n = (opts.i18n instanceof I18N) ? opts.i18n : new I18N("iModelJs", opts.i18n);

    // first register all the core tools. Subclasses may choose to override them.
    const coreNamespace = this.i18n.registerNamespace("CoreTools");
    [
      selectTool,
      idleTool,
      viewTool,
      clipViewTool,
      measureTool,
      accudrawTool,
      pluginTool,
    ].forEach((tool) => this.tools.registerModule(tool, coreNamespace));

    this.registerEntityState(EntityState.classFullName, EntityState);
    [
      modelState,

@bentley/imodeljs-i18n

iModel.js localization code

MIT
Latest version published 2 years ago

Package Health Score

51 / 100
Full package analysis

Popular @bentley/imodeljs-i18n functions