Problem / motivation
D7 i18n_taxonomy module provides two different taxonomy translation concepts: 'localized terms' and 'translated terms'. In addition to this, there is also a possibility to say that all terms of give vocabulary get a 'fixed language'. See screenshot below on the vocabulary settings that i18n_taxonomy provides.
Note that the multilingual capabilities provided by i18n_taxonomy module are different than the D7 Entity Translation module.
In 'localized terms' concept, there is one term entity but the fields (title, description, possible custom fields) of this term can be translated to different languages. In other words, there is just one term ID but several translations of the fields.
In 'translated terms' concept, each language version of the term is a separate term entity with an own term ID and each term has a language code.
Proposed resolution
Put the new migration, d7_taxonomy_term_translation.yml because it requires the language module to be enabled. Add a new source plugin that will get the term language when the i18nmode is set. And add a dedicated test.
The scope of this issue is to migrate the language code of the terms from D7 to D8. The language code is stored in taxonomy_term_data.language database column.
Similar migration has already been implemented for migrating the D6 i18n_taxonomy term language codes in #2784371: Migrate D6 i18n taxonomy term translation (but not yet localized translations)
Remaining tasks
1. Patch
2. Review and test
3. Commit
User interface changes
N/A.
API changes
N/A.
Data model changes
N/A.