def METHOD_NAME(self, default: Optional[str]) -> napi.Locales:
    """ Get the locales from the language parameter.
    """
    if self.lang:
        return napi.Locales.from_accept_languages(self.lang)
    if default:
        return napi.Locales.from_accept_languages(default)
    return napi.Locales()