<a id="csv"></a>

# CSV datoteke

<a id="index-0"></a>

CSV files can contain a simple list of source and translation. Weblate supports
the following files:

* Files with header defining fields (`location`, `source`, `target`,
  `ID`, `fuzzy`, `context`, `translator_comments`,
  `developer_comments`). This is the recommended approach, as it is the least
  error prone. Choose CSV file as a file format.
* Files with two fields—source and translation (in this order). Choose
  Simple CSV file as a file format.
* Headerless files with fields in order defined by the [translate-toolkit](https://toolkit.translatehouse.org/): `location`, `source`,
  `target`, `ID`, `fuzzy`, `context`, `translator_comments`, `developer_comments`.
  Choose CSV file as a file format.
* Remember to define [Jednojezična datoteka osnovnog jezika](https://docs.weblate.org/hr/latest/admin/projects.md#component-template) when your files are monolingual
  (see [Dvojezični i jednojezični formati](https://docs.weblate.org/hr/latest/formats.md#bimono)).

#### HINT
By default, the CSV format does autodetection of file encoding. This can be
unreliable in some corner cases and causes performance penalty. Please
choose a file format encoding to avoid this (for example UTF-8).

#### WARNING
The CSV format currently automatically detects the dialect of the CSV file.
In some cases the automatic detection might fail and you will get mixed
results. This is especially true for CSV files with newlines in the
values. As a workaround it is recommended to omit quoting characters.

#### SEE ALSO
[CSV](https://docs.translatehouse.org/projects/translate-toolkit/en/latest/formats/csv.html)

<a id="multivalue-csv"></a>

## CSV datoteka s više vrijednosti

#### Versionadded
Added in version 4.13.

This variant of the CSV files allows storing multiple translations per string.

See [Multivalue formats](https://docs.weblate.org/hr/latest/formats.md#format-multivalue) for how alternatives are handled by quality checks,
automatic fixes, and machine translation.

## Example files

Example file:

```text
Thank you for using Weblate.,Děkujeme za použití Weblate.
```

<!-- AUTOGENERATED START: format-features csv -->
<!-- This section is automatically generated by `./manage.py list_format_features`. Do not edit manually. -->

#### Podržane funkcije

| Datotečni sufiks                                                                                           | `.csv`, `.txt`                   |
|------------------------------------------------------------------------------------------------------------|----------------------------------|
| Jezičnost [ⓘ](https://docs.weblate.org/hr/latest/formats.md#bimono)                                          | Jednojezične i dvojezične        |
| Podržava množinu [ⓘ](https://docs.weblate.org/hr/latest/formats.md#format-plurals)                           | `Yes`                            |
| Podržava opise [ⓘ](https://docs.weblate.org/hr/latest/formats.md#format-description)                         | `Yes`                            |
| Podržava objašnjenja [ⓘ](https://docs.weblate.org/hr/latest/formats.md#format-explanation)                   | `No`                             |
| Podržava kontekst [ⓘ](https://docs.weblate.org/hr/latest/formats.md#format-context)                          | `Yes`                            |
| Podržava mjesto [ⓘ](https://docs.weblate.org/hr/latest/formats.md#format-location)                           | `Yes`                            |
| Podržava oznake [ⓘ](https://docs.weblate.org/hr/latest/formats.md#format-flags)                              | `No`                             |
| Dodatna stanja [ⓘ](https://docs.weblate.org/hr/latest/formats.md#format-states)                              | `Needs editing`                  |
| Identifikator API-ja                                                                                       | `csv`, `csv-multi`, `csv-simple` |
| Podržava izraze koji su samo-za-čitanje [ⓘ](https://docs.weblate.org/hr/latest/formats.md#read-only-strings) | `No`                             |
| Supports removing obsolete strings [ⓘ](https://docs.weblate.org/hr/latest/formats.md#obsolete-strings)       | `No`                             |
<!-- AUTOGENERATED END: format-features csv -->

## Weblate konfiguracija

|                                       | Typical Weblate [Konfiguracija komponente](https://docs.weblate.org/hr/latest/admin/projects.md#component) for bilingual CSV   |
|---------------------------------------|-----------------------------------------------------------------------------------------------------------------------|
| Maska datoteke                        | `locale/*.csv`                                                                                                        |
| Jednojezična datoteka osnovnog jezika | Empty                                                                                                                 |
| Predložak za nove prijevode           | `locale/en.csv`                                                                                                       |
| Format datoteke                       | CSV file                                                                                                              |

|                                       | Typical Weblate [Konfiguracija komponente](https://docs.weblate.org/hr/latest/admin/projects.md#component) for monolingual CSV   |
|---------------------------------------|-------------------------------------------------------------------------------------------------------------------------|
| Maska datoteke                        | `locale/*.csv`                                                                                                          |
| Jednojezična datoteka osnovnog jezika | `locale/en.csv`                                                                                                         |
| Predložak za nove prijevode           | `locale/en.csv`                                                                                                         |
| Format datoteke                       | Simple CSV file                                                                                                         |
