dougiteixeira 94150fc27d
Updates translation docs for custom components (#1752)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-04-21 13:05:28 +02:00

1.1 KiB

title
title
Custom Component Localization

Translation Strings

Unlike localized strings merged in the home-assistant repository, custom components cannot take advantage of Lokalise for user-submitted translations. However, custom component authors can still include translations with their components. These will be read from the translations directory, adjacent to the component source. They are named <language_code>.json in the translations directory, e.g., for the German translation de.json.

This file will contain the different strings that will be translatable for different things that the custom components offers that need to be translated. These files follow the same formatting as backend translation string files, but a copy will exist for each translated language.

The language codes follow the BCP47 format.

To make sure that your translation files are correct, test with our integration validator Hassfest. Set up instructions here.