• Instead of using this function directly, it is recommended to use registerLocalizationEntryPoints function instead. registerLocalizationEntryPoints is a wrapper around this function that provides a more convenient way to register localization entry points.

    This function is designed to be used as callback of the app.getDataHelper('localization-registration', callback) call.

    The function returns a function that can be called with a LocalizationGenerator function. When this function is called, it will register the localization entry points that were provided as data.

    Parameters

    • data: LocalizationGeneratorParams[]

      Data containing the information needed to register the localization station paths for the entity using the localization generator

    Returns ((generator) => LocalizationEntryPoints)

    A function that will register the localization entry points using provided data

    Example

    app.getDataHelper('localization-registration', generateLocalizationEntryPoints([
    { root: '/movie/:id', entityIdParam: 'id', entityType: 'movie' },
    { root: '/series/:seriesId', entityIdParam: 'seriesId', entityType: 'series' },
    // with resolveRoot
    {
    root: '/channel/:channelId/playlist/:playlistId',
    resolveRoot: async(playlistId: string) => Promise.resolve({ channelId:'123' }),
    entityIdParam: 'playlistId',
    entityType: 'playlist'
    }
    ]));

Generated using TypeDoc