Decluttering Card Plus Contents ↓ GitHub ↗

Translations (v1.2.0+)

Everything the card says follows the language set in your Home Assistant profile — the editors, the error messages, the Share and Where-used tools, even the warnings it writes to the browser console. There is nothing to configure on the card itself.

This page is about the card’s own words. The words inside a template you write or share, its titles, labels and descriptions, are translated in the template itself, with a language: block (v2.10.0+): see Translating a Shared Template.

Twenty-three languages ship with it (v2.12.0+; six before):

Language File
English en.json (the source)
Arabic (v2.12.0+) ar.json
Bengali (v2.12.0+) bn.json
Chinese (Simplified) (v2.12.0+) zh-Hans.json
Chinese (Traditional) (v2.12.0+) zh-Hant.json
Czech (v2.12.0+) cs.json
Danish (v2.12.0+) da.json
Dutch (v1.3.0+) nl.json
French fr.json
German (v1.3.0+) de.json
Hindi (v2.12.0+) hi.json
Indonesian (v2.12.0+) id.json
Italian (v2.12.0+) it.json
Japanese (v2.12.0+) ja.json
Korean (v2.12.0+) ko.json
Polish (v2.12.0+) pl.json
Portuguese pt.json
Russian (v2.12.0+) ru.json
Spanish es.json
Swedish (v2.12.0+) sv.json
Turkish (v2.12.0+) tr.json
Ukrainian (v2.12.0+) uk.json
Urdu (v2.12.0+) ur.json

Arabic and Urdu read right to left (v2.12.0+): the card’s own panels, the editors and the error card are laid out right to left, the way Home Assistant’s own screens are, while YAML and code stay left to right. The note on the error card saying a line was not found is in the viewer’s language too (v2.12.0+); before, it stayed in English.

A regional language falls back to its base — pt-BR reads pt — and anything a translation does not cover falls back to English, key by key. So a partial translation shows a mixed card rather than a broken one.

To change language, open your profile in Home Assistant (your name at the bottom of the sidebar) and pick one under Language. The card follows along after a reload.


Adding a language

One file, no code to speak of. The translations live in src/locales/ in the main repository:

  1. Copy en.json to <code>.json — it.json for Italian, sv.json for Swedish. The two-letter code is the one Home Assistant uses for the language.
  2. Translate the values. The keys stay exactly as they are.
  3. Register the file in src/localize.ts: one import line at the top, one entry in the LANGUAGES map. The two lines already there for fr show the shape.

What to leave alone

Some things in the sentences belong to the card, not the language:

npm test checks all of this for you: it lists any keys you have missed and fails if a translation lost one of its placeholders. Don’t agonise over a sentence you are not sure of — at runtime a missing key just falls back to English, so leave it out and say so in the pull request.

Sending it in

However you like:

Corrections to an existing translation are just as welcome, and smaller still — a pull request touching the one file, or an issue quoting the key and what it should say. If you only fix three sentences, that is three sentences better than before.