---
title: "Language files"
description: "Load published language files in your application and keep the original language available when needed."
canonical_url: "https://docs.linguana.dev/docs/reference/catalog-delivery"
markdown_url: "https://docs.linguana.dev/docs/reference/catalog-delivery.md"
x_farming_labs_generated_preamble: true
---

# Language files
URL: /docs/reference/catalog-delivery
LLM index: /llms.txt
Description: Load published language files in your application and keep the original language available when needed.

# Language files

## Load a catalog

```ts
const catalog = await loadCatalog({
  endpoint: "https://api.example.com",
  projectId: "your-project-id",
  environment: "production",
  locale: "fr",
  publishableKey: "pk_…",
});
```

`loadCatalog` requests the selected language file with `x-linguana-key`, checks that it belongs to your project, and returns it to the application.

## Credentials

A **project token** authorizes build and translation work and stays in CI. A **publishable key** allows the app to read published language files and may be configured in browser code. They are not interchangeable.

## Fallback order

When a user changes language, `LocaleProvider` uses a loaded language first and then tries the API. If loading fails, it uses the embedded original language and keeps the page readable.

## Verify

Publish a language, request it from the app, and confirm the correct project, environment, and language are returned. Then deny the request and confirm the original language remains readable.

<FailureGuide symptom="The language file cannot be used" cause="The response is damaged or belongs to a different project, environment, or language." check="Do not render it; request the file again and confirm the API settings and publishable key." />

## Next

Add [integration tests](/docs/automate/test-integration) and complete the [production checklist](/docs/automate/production-checklist).

## Sitemap

See the full [sitemap](/sitemap.md) for all pages.
Docs-scoped sitemap: [/docs/sitemap.md](/docs/sitemap.md).
Well-known sitemap: [/.well-known/sitemap.md](/.well-known/sitemap.md).
