ENGLISH·COURSE API
    Preparing search index...
    • The locale an account email must be written in, read from the link it carries.

      Parameters

      • actionUrl: string

        The link the email delivers

      Returns "en" | "pt" | "es"

      That locale, or the default locale when none can be read

      Better Auth runs the email callbacks without any request locale, but every account form passes a locale-qualified callbackURL (/es/learning, /es/reset-password), and Better Auth copies it into the link. The first segment of that path is the locale the learner acted in.

      An email whose link points straight at a page rather than at the auth API — the password-changed notice, which opens /es/forgot-password — carries no callbackURL at all. Its own path already spells the locale, so that is read next. A /api/auth/... link falls past it, api being no locale.