|
| 1 | +# Translations |
| 2 | + |
| 3 | +If your data sources have separate data elements for different language versions of the same content, you can publish each language as a separate OCDS dataset. |
| 4 | + |
| 5 | +```{admonition} What does "same content" mean? |
| 6 | +Two texts have the same content if they describe the same thing: for example, "United Kingdom" in English and "Royaume-Uni" in French. On the other hand, if your contracting process has different contact points for different language speakers, that content is *not* the same. Your OCDS data should therefore contain one contact point for each, using the [Additional Contact Points](https://extensions.open-contracting.org/en/extensions/additionalContactPoint/master/) extension. |
| 7 | +``` |
| 8 | + |
| 9 | +## What you can translate |
| 10 | + |
| 11 | +You can publish the values of these fields in any language: |
| 12 | + |
| 13 | +% STARTLIST |
| 14 | +- `description`, in any location |
| 15 | +- `legalName`, in any location |
| 16 | +- `name`, in any location |
| 17 | +- `rationale`, in any location |
| 18 | +- `statusDetails`, in any location |
| 19 | +- `title`, in any location |
| 20 | +- `parties/address/locality` |
| 21 | +- `parties/address/region` |
| 22 | +- `parties/address/streetAddress` |
| 23 | +- `planning/budget/project` |
| 24 | +- `tender/awardCriteriaDetails` |
| 25 | +- `tender/exclusionGrounds` |
| 26 | +- `tender/procurementMethodDetails` |
| 27 | +- `tender/procurementMethodRationale` |
| 28 | +- `tender/selectionCriteria` |
| 29 | +- `tender/submissionMethodDetails` |
| 30 | +% ENDLIST |
| 31 | + |
| 32 | +When publishing OCDS data in different languages, remember to set the `language` field. For example: |
| 33 | + |
| 34 | +`````{tab-set} |
| 35 | +
|
| 36 | +````{tab-item} English |
| 37 | +```{code-block} json |
| 38 | +:emphasize-lines: 8,11 |
| 39 | +{ |
| 40 | + "ocid": "ocds-213czf-000-00001", |
| 41 | + "id": "1", |
| 42 | + "date": "2024-01-01T00:00:00Z", |
| 43 | + "tag": [ |
| 44 | + "tender" |
| 45 | + ], |
| 46 | + "language": "en", |
| 47 | + "tender": { |
| 48 | + "id": "1", |
| 49 | + "title": "Purchase of office supplies" |
| 50 | + } |
| 51 | +} |
| 52 | +``` |
| 53 | +```` |
| 54 | +
|
| 55 | +````{tab-item} Spanish |
| 56 | +```{code-block} json |
| 57 | +:emphasize-lines: 8,11 |
| 58 | +{ |
| 59 | + "ocid": "ocds-213czf-000-00001", |
| 60 | + "id": "1", |
| 61 | + "date": "2024-01-01T00:00:00Z", |
| 62 | + "tag": [ |
| 63 | + "tender" |
| 64 | + ], |
| 65 | + "language": "es", |
| 66 | + "tender": { |
| 67 | + "id": "1", |
| 68 | + "title": "Compra de material de oficina" |
| 69 | + } |
| 70 | +} |
| 71 | +``` |
| 72 | +```` |
| 73 | +
|
| 74 | +````` |
| 75 | + |
| 76 | +## What you cannot translate |
| 77 | + |
| 78 | +The names of fields, and the values of all fields not listed above, need to be the same across your translated OCDS datasets, in order to support interoperability, which is the purpose of standardization. These cover: |
| 79 | + |
| 80 | +- **Identifiers**, like `ocid`, `id`, etc. |
| 81 | +- **Codes**, like release tags, identifier schemes and milestone codes |
| 82 | +- **Formatted values**, like URLs, dates, email addresses, telephone numbers and postal codes |
| 83 | +- **Non-text fields**, like numbers and booleans |
| 84 | + |
| 85 | +For example, the name of the `tag` field needs to be "tag", and its value needs to be a list of codes from the [release tag codelist](../../schema/codelists.md#release-tag). |
| 86 | + |
| 87 | +`````{tab-set} |
| 88 | +
|
| 89 | +````{tab-item} Valid |
| 90 | +```{code-block} json |
| 91 | +:emphasize-lines: 5-7 |
| 92 | +{ |
| 93 | + "ocid": "ocds-213czf-000-00001", |
| 94 | + "id": "1", |
| 95 | + "date": "2024-01-01T00:00:00Z", |
| 96 | + "tag": [ |
| 97 | + "tender" |
| 98 | + ], |
| 99 | + "language": "es", |
| 100 | + "tender": { |
| 101 | + "id": "1", |
| 102 | + "title": "Compra de material de oficina" |
| 103 | + } |
| 104 | +} |
| 105 | +``` |
| 106 | +```` |
| 107 | +
|
| 108 | +````{tab-item} Invalid (incorrect name) |
| 109 | +```{code-block} json |
| 110 | +:emphasize-lines: 5 |
| 111 | +{ |
| 112 | + "ocid": "ocds-213czf-000-00001", |
| 113 | + "id": "1", |
| 114 | + "date": "2024-01-01T00:00:00Z", |
| 115 | + "etiqueta": [ |
| 116 | + "tender" |
| 117 | + ], |
| 118 | + "language": "es", |
| 119 | + "tender": { |
| 120 | + "id": "1", |
| 121 | + "title": "Compra de material de oficina" |
| 122 | + } |
| 123 | +} |
| 124 | +``` |
| 125 | +```` |
| 126 | +
|
| 127 | +````{tab-item} Invalid (incorrect value) |
| 128 | +```{code-block} json |
| 129 | +:emphasize-lines: 6 |
| 130 | +{ |
| 131 | + "ocid": "ocds-213czf-000-00001", |
| 132 | + "id": "1", |
| 133 | + "date": "2024-01-01T00:00:00Z", |
| 134 | + "tag": [ |
| 135 | + "licitación" |
| 136 | + ], |
| 137 | + "language": "es", |
| 138 | + "tender": { |
| 139 | + "id": "1", |
| 140 | + "title": "Compra de material de oficina" |
| 141 | + } |
| 142 | +} |
| 143 | +``` |
| 144 | +```` |
| 145 | +
|
| 146 | +````` |
| 147 | + |
| 148 | +## Translating headers in spreadsheets |
| 149 | + |
| 150 | +To ease access for non-English speakers, instead of using field *names* as column headers (which are always in English), you can use field *titles*, which are translated in [OCDS translations](localization.md#translating-the-standard). |
| 151 | + |
| 152 | +For example, this CSV excerpt uses field titles from the Spanish translation: |
| 153 | + |
| 154 | +| ID de Entrega | Fecha de entrega | |
| 155 | +| ------------- | -------------------- | |
| 156 | +| 1 | 2024-01-01T00:00:00Z | |
| 157 | + |
| 158 | +You can use [Flatten Tool](https://flatten-tool.readthedocs.io/en/latest/) to generate files with field titles. For example, this command converts an OCDS release package to XLSX format, using field titles from the release schema: |
| 159 | + |
| 160 | +```bash |
| 161 | +flatten-tool flatten release_package.json --output-format=xlsx --use-titles --schema=release-schema.json --root-id=ocid --root-list-path=releases |
| 162 | +``` |
| 163 | + |
| 164 | +```{note} |
| 165 | +Field titles are available in English, Spanish and French. To translate titles to another language, [contact the Data Support Team](mailto:[email protected]). |
| 166 | +``` |
0 commit comments