This document explains how Part-DB's translation system works and how contributors can effectively use it.
## Overview
Part-DB uses Symfony's translation system with XLIFF format files. Translations are managed through [Crowdin](https://part-db.crowdin.com/part-db), but understanding the system's features is important for contributors working on code or translations.
## Basic Translation Approach
Part-DB uses translation keys rather than translating English strings directly. For example:
- Translation key: `part.info.title`
- English: "Part Information"
- German: "Bauteil-Informationen"
This approach has several advantages:
- Keys remain stable even if the English text changes
- The same key can have different translations in different contexts
- Keys are organized hierarchically by feature/context
Part-DB includes a powerful synonym system that allows customizing the names of entity types (like "Category", "Part", "Manufacturer") throughout the interface. This is particularly useful for organizations that prefer different terminology.
### How Synonyms Work
Administrators can define custom names for entity types in the settings (Settings → Synonyms). These custom names are then automatically substituted throughout the application using translation placeholders.
### Placeholder Syntax
The synonym system uses special placeholders in translation strings that get replaced with the appropriate entity type name:
| Placeholder | Meaning | Example Output (Default) | Example Output (with synonym) |
**Note for inflected languages**: In languages like German where words are inflected (e.g., case declensions), synonyms should be defined in the nominative case (the standard/dictionary form). The placeholders will be substituted as-is, so translations need to be written to work with the nominative form.