# Internalization
# General ideas
- Developers required to change only English text (en.yml file). Any other languages are optional.
- We use English as the fallback language.
# Adding keys
- Developer adds new keys only to en.yml.
- Developer makes MR to master branch.
- When MR is merged, the changes automatically are pushed to lokalise (opens new window)
- QA person performs the review.
- QA person deploys the changes Download → Build only.
- (Optional) QA Person deploys the branch to a staging server.
- Lokalise create a MR with the changes for master branch.
- Project lead makes the review of the MR and merges.
# Renaming keys
::: warn The keys are immutable. That helps us to keep the language files compatible with previous versions of the product. :::
- Create a new key.
- Open Lokalize, find the old key.
- Open
version.php
, take first 2 version numbers. For example, file contains9.14.20
, you need to take only9.14
. - Add tag
deprecated-9.14
to the old keys. - When 9.14 support is discontinued, we the keys assigned to
deprecated-9.14
tag.
# Deleting keys
The keys are immutable. That helps us to keep the language files compatible with previous versions of the product.
- Open Lokalize, find the old key.
- Open
version.php
, take first 2 version numbers. For example, file contains9.14.20
, you need to take only9.14
. - Add tag
deprecated-9.14
to the old keys. - When 9.14 support is discontinued, we the keys assigned to
deprecated-9.14
tag.
# Localise export settings
- File format — YAML (.yml, .yaml)
Languages:
- Set
zh
for Chinese Traditional.
File structure
- One file per language — selected.
- Bundle structure — public/application/translations/%LANG_ISO%.%FORMAT%
Content to export
- Data — By default (All)
Advanced settings
- Disabled referencing - checked
- Language code as root key - unchecked
- Empty translations - Don't export
- Sort keys by - Key name A-Z
- Plural format - Array
- Indentation - 2 spaces
App triggers
- Check GitLab