indico
indico copied to clipboard
Add option to translate title and description of categories
Add the possibility to translate the title and description of categories.
In the settings I've added buttons to create new fields to add a translation for a language
With the button you get a select field to select the desired language and an input field to enter the translation. You can add multiple translations if you click the button multiple times.
When the translations are saved, they appear in the form, so you can always edit them. When you empty the field, the translation is discarded.
When browsing through the categories/events the user sees the title and description of the category in the language he chose, if there is a translation available for that language. If no translation is available, the default title/description is shown.
closes #5353
There's one somewhat tricky issue: In some places we use the chain_titles
if a category which contains the titles of the parent category chain (queried in an efficient way). But of course this currently doesn't take into account the i18n you added...
I'm not sure what's the best solution for this, possibly adding an chain_titles_translations
property similar to chain_titles
where each entry contains the json object with the translations?