seyfert
    Preparing search index...

    Class LangsHandler

    Hierarchy

    • BaseHandler
      • LangsHandler
    Index

    Constructors

    Properties

    aliases: [
        string,
        (
            | "id"
            | "en-US"
            | "en-GB"
            | "bg"
            | "zh-CN"
            | "zh-TW"
            | "hr"
            | "cs"
            | "da"
            | "nl"
            | "fi"
            | "fr"
            | "de"
            | "el"
            | "hi"
            | "hu"
            | "it"
            | "ja"
            | "ko"
            | "lt"
            | "no"
            | "pl"
            | "pt-BR"
            | "ro"
            | "ru"
            | "es-ES"
            | "es-419"
            | "sv-SE"
            | "th"
            | "tr"
            | "uk"
            | "vi"
        )[],
    ][] = []
    defaultLang?: string
    logger: Logger

    The logger instance.

    values: Partial<Record<string, any>> = {}

    Methods

    • Parameters

      • path: string

      Returns boolean

    • Recursively retrieves all files in a directory.

      Parameters

      • dir: string

        The directory path.

      Returns Promise<string[]>

      A Promise that resolves to an array of file paths.

    • Parameters

      • lang: string
      • message: string

      Returns undefined | string

    • Loads files from given paths.

      Type Parameters

      • T extends {}

      Parameters

      • paths: string[]

        The paths of the files to load.

      Returns Promise<T[]>

      A Promise that resolves to an array of loaded files.

    • Loads files from given paths along with additional information.

      Type Parameters

      • T

      Parameters

      • paths: string[]

        The paths of the files to load.

      Returns Promise<{ file: T; name: string; path: string }[]>

      A Promise that resolves to an array of objects containing name, file, and path.

    • Parameters

      Returns false | { file: Record<string, any>; locale: string }

    • Parameters

      • lang: string

      Returns Promise<null | Record<string, any>>

    • Parameters

      • stopIfFail: boolean = true

      Returns Promise<void>