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.…
Generated from the SDK's own /docs/ — also served raw at
https://shipeasy-ai.github.io/sdk-python/pages/i18n.md.
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
- The browser loads the Shipeasy client SDK and calls
t("key")to render labels. That is where translation actually happens. - 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(), the tag helpers are package-level — they
delegate to the configured engine, so you never touch it:
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:
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.
A/B experiments — `get_experiment` + `track`
After configure(), an experiment is end-to-end through the bound shipeasy.Client(user) — read the assignment, log exposure, and track the conversion, all on…
Error reporting — `see()`
The Python SDK ships the see() structured-error surface. It reports a caught, handled error (or a non-exception "violation") to Shipeasy as a…