I see the way how to translate custom configs.

Comments

victor-shelepen’s picture

Issue tags: +CodeSprintUA

While this meeting, I am investigating this problem.

Gábor Hojtsy’s picture

Category: feature » support
Status: Active » Postponed (maintainer needs more info)

Here is a short summary:

Drupal best practices:
1. Your config should be stored with the config .yml system in core
2. You should write configuration schemas for your config (docs: https://drupal.org/node/1905070, module to test/inspect: https://drupal.org/project/config_inspector)
3. Make sure your config file has langcode: en (or another langcode as appropriate) at all times; put up a language selector for users if the config can change language (see core has for views, vocabularies, etc).

Config translation UI enablement
4. If (1), (2) and (3) are true, you can use hook_config_translation_group_info() (see docs in https://drupal.org/project/config_translation) to map config keys to paths (or config entities, if you have those)
5. If the config you are dealing with is a config entity and you also have a listing page for your entities, add a translate operation to the list if the config_entity module is turned on (this will hopefully be automated later as well)

This will magically expose a translation tab on your config settings page (or config entity editing page), which lists languages and lets people submit translations (and go back edit original config values).

Any questions? :)

victor-shelepen’s picture

Thank you. Sorry for my late reply. I have been trying to reproduce it.

Gábor Hojtsy’s picture

Status: Postponed (maintainer needs more info) » Fixed

Automatically closed -- issue fixed for 2 weeks with no activity.