# @hua-labs/i18n-loaders - AI Documentation
# Version: 2.2.0
# Auto-generated by generate-docs — do not edit manually

package:
  name: "@hua-labs/i18n-loaders"
  version: "2.2.0"
  description: "Production-ready loaders, caching, and preloading helpers for @hua-labs/i18n-core."
  license: "MIT"

overview: "Production-ready translation loaders with built-in TTL caching, duplicate request prevention, and namespace preloading. Designed to work seamlessly with @hua-labs/i18n-core. Supports both server and client environments."

exports:
  main:
    path: "@hua-labs/i18n-loaders"
    provides:
      - name: "createApiTranslationLoader"
        type: "function"
        description: "Create API-based loader with caching and retry"
      - name: "preloadNamespaces"
        type: "function"
        description: "Preload translation namespaces"
      - name: "warmFallbackLanguages"
        type: "function"
        description: "Warm up fallback language caches"
      - name: "withDefaultTranslations"
        type: "function"
        description: "Merge API results with bundled defaults"
      - name: "ApiLoaderOptions"
        type: "type"
        description: ""
      - name: "CacheInvalidation"
        type: "type"
        description: ""
      - name: "DefaultTranslations"
        type: "type"
        description: ""
      - name: "PreloadOptions"
        type: "type"
        description: ""
      - name: "TranslationLoader"
        type: "type"
        description: ""
      - name: "TranslationRecord"
        type: "type"
        description: ""

features:
  - "API loader — createApiTranslationLoader with configurable endpoints"
  - "TTL caching — Time-based cache with global cache support"
  - "Duplicate prevention — Deduplicates concurrent requests for the same resource"
  - "Preloading — Warm up namespaces and fallback languages at startup"
  - "React Native — Works in Expo and bare RN projects"
  - "Default merging — Merge API translations with bundled defaults"

related_packages:
  - "@hua-labs/i18n-core"
  - "@hua-labs/i18n-core-zustand"
  - "@hua-labs/i18n-formatters"

compatibility:
  react: ">=19.0.0"
  node: ">=20.0.0"
