Glossia Documentation
website·Indexed 32 days ago
https://glossia.ai/docsGlossia is a localization platform that connects GitHub repositories to LLM-powered translation workflows. It features a configuration-driven approach using L10N.md, progressive refinement for translation quality, a Model Context Protocol (MCP) server for coding agents, and built-in localization analytics and web SDKs.
What's inside Glossia
- Glossia provides a Model Context Protocol (MCP) server that allows coding agents to interact with localization projects. Once connected, agents can query translation status, trigger translations and revisions, inspect configuration and content entries, and access project context for improved code suggestions.
Configure translation rules using L10N.md
L10N.mdis the configuration file that tells Glossia which files to translate, the target languages, where the translated files should be placed, and the context for the translation. A repository can have a rootL10N.mdand additional scoped files in subdirectories to override settings or add specific guidance.--- source_language: en model: translation-default sources: "docs/**/*.md": "docs/i18n/{locale}/{relpath}" targets: - es - ja validation: - ./scripts/validate-docs.sh - --strict frontmatter: preserve preserve: - placeholders - urls --- Write for software developers. Keep product names and code samples unchanged.Understand Glossia's server-side translation workflow
Translation is performed on the Glossia server, not locally via the CLI. The workflow is as follows:
- A commit is pushed.
- Glossia reads the
L10N.mdfiles to plan the work. - Files are translated using the configured model.
- A pull request is opened with the results.
Model Selection: The model is determined per document. If a
model:key is specified inL10N.md, that specific account model handle is used; otherwise, the account's default model is applied.CLI Limitations: The CLI does not perform planning, translation, validation, inspection, or deletion of translations, nor does it read server translation lockfiles.
Glossia web analytics privacy model
The Glossia web analytics SDK is designed for privacy and avoids persistent tracking:
- No Cookies: No client-side cookies are set. A per-tab session ID is stored in
sessionStorageand cleared when the tab is closed. - No Fingerprinting: The system does not collect Canvas, WebGL, font, or audio fingerprints.
- Ephemeral Identifiers: Raw IP and User-Agent data are read, hashed with a server secret and daily salt to create a
visitor_id, and then immediately discarded. - Project Isolation: Visitor IDs are scoped per project; a single browser visiting two different Glossia customers will result in two unrelated visitor IDs.
- No Cookies: No client-side cookies are set. A per-tab session ID is stored in
Send web analytics events to the Glossia API
The/api/analytics/eventsendpoint accepts JSON event data from the@glossia/webSDK. The endpoint always responds with a202 Acceptedstatus, even for malformed payloads or unknown domains, to prevent leaking information about which projects have analytics enabled. Project identification is determined by the site domain (dfield); ifdis missing, the server falls back to the host of the page URL (u), and then to the requestOriginorRefererheaders. CORS is open (Access-Control-Allow-Origin: *) as no credentials are required.POST /api/analytics/eventsUnderstand Prompt definitions in Glossia
In the Glossia application runtime, prompt definitions serve as the source-of-truth data for how prompts are managed and executed.Manage LLM providers using account-scoped models
Glossia separates repository instructions from model-provider credentials. Model configurations are stored at the account level rather than in the repository. This allows administrators to rotate provider keys or switch LLM models across multiple repositories without modifying the source code of each repository. It also ensures that sensitive provider keys are kept out of source control.Understand Glossia glossary functionality
A glossary in Glossia is a curated set of terms that must be rendered consistently across translations for a specific language. It provides guidance to the translation model rather than performing simple string substitution; the model still considers surrounding context. Glossaries are used for individual terms and approved translations, while voice, tone, and formality are handled via Voice configuration andL10N.md.Manage glossaries in the repository vs. the server
Glossia merges glossary entries from two sources at translation time:
Repository-based Glossary (Developer-Authoritative):
- Location: Defined in
L10N.md(terms) andL10N/<locale>.md(translations). - Use Case: Terms specific to a codebase, changes that must be coupled with source text via pull requests, or terms that only apply to specific directories (via nested
L10N.mdfiles). - Priority: Repository entries override server entries for the same term in the languages they translate.
Server-based Glossary (Linguist-Authoritative):
- Location: Stored in the Glossia account dashboard, REST API, or MCP server.
- Use Case: Brand terms/product names applying to multiple repositories, terms managed by linguists without code access, or fixes that need to apply immediately without a pull request.
- Features: Includes version history, change notes, and accessibility for external agents/integrations via API.
- Location: Defined in
Retry a failed Glossia project setup
When a project setup fails, you must resolve the underlying prerequisite before triggering a retry. The 'Retry setup' option is only available while the project is in the 'Failed' state to prevent concurrent setup attempts.
Step-by-step recovery process:
- Diagnose the failure: Open the project overview and check the setup progress card for the latest activity and error message.
- Fix the prerequisite:
- For model or provider key issues: Navigate to Settings > Models.
- For repository access issues: Update the Glossia GitHub App installation in GitHub to grant the necessary permissions.
- Trigger Retry: Return to the project overview and select Retry setup. The status will transition from Pending to Running.
- Verify: Once the state changes to Completed, review the generated pull request in GitHub.
Common failure causes to look for:
- No configured model in the account.
- Missing or invalid provider keys.
- Glossia GitHub App lacks repository access.
- Repository preparation or check failures.
Configure language-specific translation context in Glossia
To provide special instructions for a specific language (such as formality levels or character set requirements), create a markdown file named after the language code within theL10N/directory. Glossia merges the content of this override file with the base context for that specific language's translations.L10N/ ja.mdImplement the Glossia progressive refinement loop
Glossia uses an iterative 'progressive refinement' process to reach production-quality content. Instead of expecting perfection on the first run, users should follow a cycle of drafting, reviewing, and refining to align the output with the product's specific voice and domain nuances.
The refinement loop consists of four stages:
- Draft: Glossia generates a structurally valid first pass using source files and the
L10N.mdcontext file. - Review: Teams identify issues using standard pull requests and diffs.
- Refine: Feedback is integrated by updating context files and correcting glossary entries, which then feed into the next generation run.
- Converge: Repeated cycles narrow the gap to production quality as the system learns from the provided context.
- Draft: Glossia generates a structurally valid first pass using source files and the