Skip to content

getLanguagesToLoad

Gets the languages whose LocaleLoader initI18N calls for a given Obsidian language: the language itself, its base language when it has a region or script part, and the default language.

Import:

import { getLanguagesToLoad } from '@mnaoumov/obsidian-lib/i18n/i18n';

Signature:

function getLanguagesToLoad(language: string): string[]

Parameters:

Parameter Type Description
language string The Obsidian language, as getLanguage() returns it.

Returns: string[] — The languages to load, without duplicates.


Links to this page: