Backend
How to translate backend and embed parts
The backend (the server part) and the embedded comment engine share the same set of so-called messages, all of them located under resources/i18n/
in the project root.
You can see the list of available languages by logging into the Administration UI as a superuser and navigating to Configuration
⇒ Static
: the section Available UI languages
lists all installed translations.
Each translation is a text-based YAML file, providing a mapping between Message ID and Message translation. The file name must be a RFC 5646 tag of the target language, and its extension yaml
.
Here’s an example for English:
# en.yaml
- id: accountCreatedConfirmEmail
translation: Account is successfully created. Please check your email and click the confirmation link it contains.
- id: actionAddComment
translation: Add Comment
- id: actionApprove
translation: Approve
- id: actionCancel
translation: Cancel
And below is an example how the same messages look in Russian:
# ru.yaml
- id: accountCreatedConfirmEmail
translation: Аккаунт успешно зарегистрирован. Мы отправили вам емэйл, пожалуйста, подтвердите свой адрес, перейдя по содержащейся в нём ссылке.
- id: actionAddComment
translation: Добавить комментарий
- id: actionApprove
translation: Утвердить
- id: actionCancel
translation: Отмена
Process
If you’d like to contribute your own translation for a language that is missing, follow these steps:
- Fork the Comentario repository.
- Make a copy of an existing translation (
resources/i18n/en.yaml
is always the most complete one) into a newresources/i18n/<language_tag>.yaml
. - Translate every message.
- Commit the file into your fork.
- Submit a Merge Request for merging your changes into the
dev
branch.