initTranslations
initTranslations(
domain,path):void
Defined in: api/node/typescript/index.ts:962 ↗
Initialize translations.
Call this with the path where translations are located. This function internally calls the bindtextdomain ↗ function from gettext.
Translations are expected to be found at
Parameters
Section titled “Parameters”domain
Section titled “domain”string
defines the domain name e.g. name of the package.
string | URL
specifies the directory as string or as URL in which gettext should search for translations.
For example, assuming this is in a package called example and the default locale is configured to be French, it will load translations at runtime from “/path/to/example/translations/fr/LC_MESSAGES/example.mo`.
import * as slint from "slint-ui";slint.initTranslations("example", new URL("translations/", import.meta.url));Returns
Section titled “Returns”void
© 2026 SixtyFPS GmbH