-
Notifications
You must be signed in to change notification settings - Fork 532
Description
In order to manage indexing of documents and other resources, we need an indication of the language they are registered in. This implies having a resource_node.language_id field pointing to the language table.
This would be populated at creation (and during the migration) by using the language of the course they have been created in.
We also need to be able (to be future-proof) to have document variations (as we already do for multiple-URLs) for translations of documents. This implies having a resource_file.language_id field pointing to the language table.
Both fields must be allowed to be null, as in some cases the language is just undetermined or it is already a multilingual resource.
To do list:
- update ResourceNode entity to add
language_id int default null - update ResourceFile entity to add
language_id int default null - create migration that sets resource_node.language_id & resource_file.language_id to ...
SELECT l.id FROM resource_node rn, course c, language l WHERE rn.cid = c.id and l.isocode = c.course_language - update Xapian indexing to always spawn the Stemmer with the right language (the one from the resource_file if there is one resource_file, and otherwise the one from the resource_node)
Changing resources interfaces to allow users to set a language will come in a future version (and it should be optional, so it would require a configuration setting) - see #7156 for that.