# Translate

The **Caards** theme includes built-in support for multiple languages and can be fully translated using simple JSON files. It also offers automatic RTL support for the Arabic language (`ar`).

Included Languages:

* English (EN)
* Spanish (ES)
* French (FR)
* Portuguese (PT)
* German (DE)
* Dutch (NL)
* Italian (IT)
* Turkish (TR)
* Arabic (AR)

### How it Works

Translations are handled using Ghost’s official `{{t}}` helper and simple JSON files located in the theme’s `locales/` folder. You can easily modify existing translations or add your own without needing to install any dependencies.

For more information, see: [Ghost Translate System](https://ghost.org/docs/themes/helpers/translate/)

### How to Edit or Add a Translation

Follow the steps below:

{% stepper %}
{% step %}

#### Unzip the Theme

* Unzip the theme `caards.zip` file on your computer.
  {% endstep %}

{% step %}

#### Open the Translations Folder

* Go to the `locales/` directory inside the theme folder.
  {% endstep %}

{% step %}

#### Edit an Existing File

* Open a file like `pt.json` using a code editor such as [Visual Studio Code](https://code.visualstudio.com/) or [Sublime Text](https://www.sublimetext.com/).
* Update the values to match your preferred translations:

  ```json
  {
    "Subscribe": "Inscreva-se"
  }
  ```

{% endstep %}

{% step %}

#### Add a New Language (Optional)

* Duplicate an existing file (e.g., `en.json`)
* Rename it using a valid [language code](https://www.w3schools.com/tags/ref_language_codes.asp) (e.g., `de.json` for German)
* Replace the values with your own translations.
  {% endstep %}

{% step %}

#### Repackage the Theme

* Compress the entire theme folder into a new `caards.zip` file.
  {% endstep %}

{% step %}

#### Upload the Updated Theme

* In Ghost Admin, go to: **Settings** > **Site** > **Theme** > **Change theme** > **Upload Theme** `yoursite.com/ghost/#/settings/theme`
  {% endstep %}

{% step %}

#### Set the Site Language

* Go to **Settings** > **General** > **Publication Language** and enter your language code (e.g., `pt`, `es`, `fr`, `ar`, `de`)
  {% endstep %}
  {% endstepper %}

### Recommended Tools

To safely edit translation files, always use a code editor that supports UTF-8 encoding and JSON formatting, such as:

* [Visual Studio Code](https://code.visualstudio.com/)
* [Sublime Text](https://www.sublimetext.com/)

{% hint style="danger" %}
Avoid using basic text editors like Notepad or word processors like Word — they can break the file structure, add hidden characters, or corrupt encoding, which may cause errors when uploading the theme.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ektothemes.com/guides/caards/advanced/translate.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
