# i18n (internationalization)

**This is a server SDK. It has no `t()` / label-render API.** There is no
`i18n.init()`, no separate i18n configuration, and no server-side string
lookup. Translatable labels are rendered **in the browser** by the Shipeasy
**client** SDK's `t()` — the Python SDK's only role is to emit the loader
`<script>` tag during SSR so the browser has the right profile on first paint.

## The cross-SDK story

1. **The browser** loads the Shipeasy client SDK and calls `t("key")` to render
   labels. That is where translation actually happens.
2. **This server SDK** can emit the i18n loader tag for the document `<head>`
   so the browser SDK boots against the right profile (e.g. `{{PROFILE}}`). The
   tag carries the **public client key**, not the server key.

After [`configure()`](configuration.md), the tag helpers are package-level — they
delegate to the configured engine, so you never touch it:

```python
import shipeasy

# Emit the i18n loader tag during SSR (public CLIENT key, not the server key):
head = shipeasy.i18n_script_tag(client_key, "{{PROFILE}}")
```

`i18n_script_tag(client_key, profile, base_url=...)` returns the loader
`<script>` tag (default `base_url` is the Shipeasy CDN). You can also fold the
i18n tag into the flags bootstrap tag:

```python
head = shipeasy.bootstrap_script_tag(user, anon_id=anon_id) \
     + shipeasy.i18n_script_tag(client_key, "{{PROFILE}}")
# or, on bootstrap_script_tag itself:
shipeasy.bootstrap_script_tag(user, i18n_profile="{{PROFILE}}")
```

For the actual `t()` render and label authoring, see the **client** SDK's i18n
docs — those APIs do not exist on the server.
