← All @molecule/* packages · App templates

@molecule/api-locales-user

Translations · i18n · API (Node) · v1.0.1 · Apache-2.0

Translations for the user resource package in 79 languages

npm install @molecule/api-locales-user

npm · Source on GitHub

How it works

@molecule/api-locales-user carries the translations for the i18n package on the API (Node) side. Install it beside that package and the i18n core picks the strings up by locale.

import { af, am, ar } from '@molecule/api-locales-user'
import type { UserTranslationKey, UserTranslations } from '@molecule/api-locales-user'

Works with: @molecule/api-i18n

Reference

Auto-generated, AI-first package reference for the molecule.dev ecosystem. It is written to be read by coding agents as much as by people, and is generated from this package's source — edit src/index.ts JSDoc, not this file.

Translations for the user resource package in 79 languages

Languages

79 languages supported: af, am, ar, az, be, bg, bn, bs, ca, cs, cy, da, de, el, en, es, et, eu, fa, fi, fil, fr, ga, gl, gu, ha, he, hi, hr, hu, hy, id, ig, is, it, ja, ka, kk, km, kn, ko, ky, lo, lt, lv, mk, ml, mn, mr, ms, mt, my, nb, ne, nl, pa, pl, pt, ro, ru, si, sk, sl, sq, sr, sv, sw, ta, te, th, tr, uk, ur, uz, vi, yo, zh, zh-TW, zu.

Quick Start

import { af, am, ar } from '@molecule/api-locales-user'
import type { UserTranslationKey, UserTranslations } from '@molecule/api-locales-user'

Registration

In an mlcl-scaffolded app, installed locale bonds are registered automatically by the app's i18n setup at startup — installing this package is normally all you need. To register manually (or in a custom app), pass the whole module to registerLocaleModule from @molecule/api-i18n at startup:

import { registerLocaleModule } from '@molecule/api-i18n'
import * as locales from '@molecule/api-locales-user'

registerLocaleModule(locales)

Editing translations

en.ts is the canonical key set — every other language file mirrors its keys. To change or add strings, edit the locale files in this package (add new keys to en.ts first) or merge overrides at runtime with addTranslations(locale, map). Never hand-write translations inline in feature code: features call t(key, values, { defaultValue }) and THIS bond supplies the translations — inline strings bypass every other language.

Translation Keys

KeyEnglish
user.error.badRequestBad request.
user.error.notFoundNot found.
user.error.failedToCreateSessionFailed to create session.
user.error.usernameRequiredUsername is required.
user.error.passwordRequiredPassword is required.
user.error.emailInvalidEmail is invalid.
user.error.usernameUnavailableUsername is unavailable.
user.error.emailAlreadyRegisteredEmail is already registered.
user.error.failedToHashPasswordFailed to hash password.
user.error.invalidCredentialsInvalid credentials.
user.error.invalidTwoFactorTokenInvalid two-factor token.
user.error.twoFactorVerificationUnavailableTwo-factor verification unavailable.
user.error.loginFailedLogin failed.
user.notification.newLoginNew Login
user.notification.newLoginBodyNew login from {{deviceName}}.
user.error.usernameCannotBeEmptyUsername cannot be empty.
user.error.failedToUpdateUserFailed to update user.
user.error.failedToDeleteUserFailed to delete user.
user.error.failedToReadUserFailed to read user.
user.error.emailRequiredEmail is required.
user.email.passwordResetSubject{{appName}} - Password Reset
user.email.passwordResetTextYour password reset token is: {{token}}
user.email.passwordResetLinkReset your password at: {{url}}
user.email.passwordResetHtml<p>Your password reset token is: <strong>{{token}}</strong></p>
user.email.passwordResetHtmlLink<p><a href=
user.error.failedToProcessPasswordResetFailed to process password reset.
user.error.newPasswordRequiredNew password is required.
user.error.currentPasswordRequiredCurrent password is required.
user.error.currentPasswordIncorrectCurrent password is incorrect.
user.error.failedToUpdatePasswordFailed to update password.
user.error.planKeyRequiredplanKey is required.
user.error.invalidPlanInvalid plan.
user.error.failedToUpdateSubscriptionFailed to update subscription.
user.error.failedToUpdatePlanFailed to update plan.
user.error.twoFactorNotAvailableTwo-factor authentication is not available.
user.error.twoFactorRequiresPasswordTwo-factor authentication is enabled on this account. Sign in with your email and password to continue.
user.error.tokenRequiredToken is required.
user.error.noPendingTwoFactorSetupNo pending two-factor setup. Call with action
user.error.invalidTokenInvalid token.
user.error.twoFactorNotEnabledTwo-factor is not enabled.
user.error.invalidActionInvalid action. Use
user.error.twoFactorOperationFailedTwo-factor operation failed.
user.error.oauthServerNotConfiguredOAuth server
user.error.oauthVerificationFailedOAuth verification failed.
user.error.failedToCreateUserFailed to create user.
user.error.oauthLoginFailedOAuth login failed.

Metadata

  • Type: locales
  • Category: i18n
  • Stack: api