LanguagesService is a service in the Languages API that provides methods for fetching and manipulating languages data, including language codes and names in various formats. It helps to manage and maintain a list of available languages and their corresponding codes.

Constructors

Properties

dataSource: DataSource
loggerFactory: WinstonLoggerFactory

Accessors

  • get languagesRepository(): Repository<Language>

    Returns Repository<Language>

Methods

  • Parameters

    Returns void

  • Parameters

    Returns Promise<void>

  • Fetch language by code

    Parameters

    • code: string

      language code

    • Optionallocale: string

      language locale

    Returns Promise<MaybeNull<Language>>

  • Check if language code is in the specified scope

    Parameters

    Returns boolean

    true if language is in scope, false otherwise

  • Returns void