<!-- Source: https://docs.squirro.com/en/latest/api/squirro_client.topic.ProjectTranslationsMixin.html -->
# ProjectTranslationsMixin

**`class ProjectTranslationsMixin`**

Bases: [`object`](https://docs.python.org/3.11/library/functions.html#object)

Methods SummaryMethods Documentation

**`get_project_translations(project_id, language=None)`**

Get language translations for the provided project.

Parameters

- `project_id` – Identifier of the project
- `language` – (Optional) language to select the translations by

Returns

A list of translations.

Example:

```
>>> client.get_project_translations("project_uuid1")
[
    {
        "key":":cancel",
        "en": "Cancel",
        "de": "Abbrechen",
    },
    {
        "key": ":yes",
        "en": "Yes",
        "de": "Ja",
    },
]
```

**`modify_project_translations(project_id, translations)`**

Update language translation set.

Parameters

- `project_id` – Identifier of the project
- `translations` – List of language translations

Returns

Example:

```
>>> client.modify_project_translations("project_uuid1",
        [{"key":"cancel","en":"Cancel","de": "Abbrechen"}]
    )
[
    {
        "key":":cancel",
        "en": "Cancel",
        "de": "Abbrechen",
    },
    {
        "key": ":yes",
        "en": "Yes",
        "de": "Ja",
    },
]
```

**`new_project_translations(project_id, translations)`**

Create new language translation set. Note: the existing translation set
gets overwritten.

Parameters

- `project_id` – Identifier of the project
- `translations` – List of language translations

Returns

Example:

```
>>> client.new_project_translations("project_uuid1",
        [{"key":":yes","en":"Yes","de": "Ja"}]
    )
[
    {
        "key": ":yes",
        "en": "Yes",
        "de": "Ja",
    },
]
```
