• get locale or timezone information

    this method automatically generates "mixed" locales (like en_DE) if required

    NOTE: this requires locale data to have been loaded before. In the case of en_DE the library might need en_US and de_DE or en_UK and de_AT, depending on the users language priorities

    if a list of preferred locales was specified via select, the language will be resolved using that list e.g. with BG.locale.select(['de_AT']) a call to BG.locale.retrieve('de_US') will use the de_AT for translating names, but with BG.locale.select(['de_DE']) a call to BG.locale.retrieve('de_US') will use de_DE instead

    Parameters

    • Optionall: string
    • Optionalcb: (param: string[]) => any

      an optional callback that is called with an array containing locales that are currently not available but required for the requested locale

    Returns { [key: string]: any } | null