Written for real users
Modern Standard Arabic messages for every Better Auth error code, phrased the way an app would say it, not translated word for word.
One line turns any Better Auth error into a clear Arabic toast. Typed, tiny, and always in sync with Better Auth.
Better Auth returns a stable error code. better-auth-tarjim looks it up and shows the Arabic message in a Sonner toast, in right-to-left.
error.code === "INVALID_EMAIL_OR_PASSWORD"error.code === "EMAIL_NOT_VERIFIED"error.code === "USER_ALREADY_EXISTS"error.code === "SESSION_EXPIRED"npm i better-auth-tarjimimport { authToast } from "better-auth-tarjim";
const { error } = await authClient.signIn.email({ email, password });
if (error) authToast(error); // البريد الإلكتروني أو كلمة المرور غير صحيحةAdd Sonner's <Toaster dir="rtl" /> once in your root layout. The getting started guide covers the full setup, and usage covers withAuthToast, overrides, and the Sonner-free entry point.
Better Auth keeps its error codes stable while its English messages can change between releases. This package matches on codes only, so a wording change upstream can never break your Arabic messages. When Better Auth adds a code, the generated ErrorCode type changes and the build tells you exactly which translation is missing.
Unofficial package
better-auth-tarjim is a community project. It is not affiliated with Better Auth, and it is released under the MIT License.