Captain is currently in ALPHA. We are happy to get your feedback
Core API
Helpers Utils Locale

Module: helpers/utils/locale

Table of contents

Functions

Functions

getLocale

getLocale(): string

Retrieves the most appropriate locale for the application based on user preference, system setting, or i18next's default configuration.

Priority:

  1. User-defined language stored in userStore.
  2. System's preferred language obtained via Electron's app.getLocale().
  3. Default locale specified in i18next configuration.

Returns

string

The determined locale string.

Defined in

src/electron/helpers/utils/locale.ts:18 (opens in a new tab)