Split i18n file into several files

I have the following translation files in the i18n

i18n/en.toml
i18n/es.toml

They start to get quite big, so I am wondering if their is an option to split them, so that it is easier to remember to what section of the site a string is linked to.

Something like:

i18n/topica.en.toml
i18n/topica.es.toml
i18n/topicb.en.toml
i18n/topicb.es.toml

or:

i18n/topica/en.toml
i18n/topica/es.toml
i18n/topicb/en.toml
i18n/topicb/es.toml

I understand that this could lead to potential duplicates, which would be an issue, but it won’t be the case in my situation.

Maybe it is already possible, but I have not seen anything in the documentation about multiples i18n files.

This is not possible.

1 Like

Easiest way to manage such is to add comments (with # in TOML) to the parts you are translating to show which parts of your site a set of translations belong to. I do this, since my own i18n files are several hundred lines long.

1 Like

Yes, that is what I do at the moment. I was wondering if there was an other alternative.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.