Skip to content

Language Configuration

AIR Kit supports multi-language interfaces. You can configure which languages are available and provide custom translations for your users.

Configuration Options

tsx
{
  defaultLanguage?: string; // Default language (e.g., "en", "es", "fr", ...)
  authLocaleUrls?: Record<string, string>; // Auth interface language URLs
  walletLocaleUrls?: Record<string, string>; // Wallet interface language URLs
  recoveryLocaleUrls?: Record<string, string>; // Recovery interface language URLs
  credentialLocaleUrls?: Record<string, string>; // Credential interface language URLs
}

Setting Up Multi-Language Support

1. Set Default Language:

tsx
defaultLanguage: "es"; // Spanish as default language

2. Provide Language File URL: We will upload your translated language file(s) to our server and provide the URL for configuration:

tsx
{
  defaultLanguage: "es",
  authLocaleUrls: {
    "es": "<https://static.air3.com/partner/your-partner-id/i18n-auth-es.json>"
  },
  walletLocaleUrls: {
    "es": "<https://static.air3.com/partner/your-partner-id/i18n-wallet-es.json>"
  }
}

Language File Format

Language files are JSON objects with translated strings:

json
{
  "login": {
    "google": {
      "button": "Continue with Google",
      "error": "Google login failed. Please try again or use another login method."
    },
    "passkey": {
      "button": "Continue with Passkey",
      "authenticating": "Authenticating..."
    }
  },
  "wallet": {
    "connect": "Connect Wallet",
    "transaction": {
      "confirm": "Confirm Transaction",
      "pending": "Transaction Pending"
    }
  },
  ...
}

How Language Selection Works

  1. Default Language: Your defaultLanguage setting determines the interface language
  2. Language File: The system loads the language file from the provided URL
  3. English Fallback: If a translation key is missing, it falls back to English
  4. No Language Switching: Currently, the language is set once during initialization and cannot be detected by the browser or changed by the user