development/php/drupal/multilingual-search-api-with-entity-translationFork of drunken monkey's Search API Entity Translation v2 sandbox module, taking it further and adding missing features (with an issue created on drunken monkey's sandbox for most of those):
- indexing in the correct language (#2054735)
entity_translation
CRUD hook implementations (#2055449)hook_disable()
andhook_uninstall()
implementations (might still be changed, I'm open to discussion here) (#2055577)hook_features_export_alter()
implementation (#2055709)- missing module dependency:
entity_translation
(ibid) - admin UI for the index settings
- re-queueing multilingual indexes with Languages to be included in the index settings option set to completed entity languages on each translation add/update/delete, translatable field add/delete, language add/delete/enable/disable
This sandbox here is just to have everything together, and it will be deleted once all the changes are merged into drunken monkey's sandbox and/or main Search API Entity Translation module.
At its current stage the module already seems to work fine, indexing items in the correct language, and allowing for language-specific searches like:
$index = search_api_index_load("multilingual_node_index");
$query = new SearchApiQuery($index);
$query->setOption('languages', array('fr'));
$results = $query->execute();
Also seems to be working (almost) fine with Search API Views.
Read more on its origins in Multilingual Search API with Entity Translation.
Extension projects
- Search API Entity Translation Solr search - changes the way in which Solr Search module stores the multilingual content, making it use solr dynamic fields for translatable entity fields.
Related projects
Similar projects
- Search API Entity Translation - a first, minimalist approach, offering a new entity property/search API field named "Multilingual full text" which concatenates all the rendered entity translations of a specific entity,
- Search API Entity Field Translation - fork of Search API Entity Translation above, more advanced although still pretty minimalist, providing separate new entity properties/search API fields for each translatable field on each translatable entity,
- Entity translation search API in GaëlG's sandbox - uses an alternative way of getting language aware search with entity translation by having one index per language.
- Search API Entity Translation v2 - new approach of providing translated entities to Search API by drunken monkey, not working and quite a way from being finished - see this and following comments for more info on this module and its current state.