You are here

public static function Utility::getLanguageSpecificSolrDynamicFieldPrefix in Search API Multilingual Solr Search 8

Gets the language-specific prefix for a dynamic Solr field.

Parameters

string $prefix: The language-unspecific prefix.

string $language_id: The Drupal language code.

Return value

string The language-specific prefix.

4 calls to Utility::getLanguageSpecificSolrDynamicFieldPrefix()
AbstractSearchApiSolrMultilingualBackend::alterSolrDocuments in src/Plugin/search_api/backend/AbstractSearchApiSolrMultilingualBackend.php
Replaces language unspecific fulltext fields by language specific ones.
SolrFieldType::getCopyFields in src/Entity/SolrFieldType.php
Gets a list of copy fields that will use this Solr Field Type.
SolrFieldType::getDynamicFields in src/Entity/SolrFieldType.php
Gets a list of dynamic Solr fields that will use this Solr Field Type.
UtilitiesTest::doDynamicFieldNameConversions in tests/src/Kernel/UtilitiesTest.php
Tests all conversion and extraction functions.

File

src/Utility/Utility.php, line 115

Class

Utility
Provides various helper functions for multilingual Solr backends.

Namespace

Drupal\search_api_solr_multilingual\Utility

Code

public static function getLanguageSpecificSolrDynamicFieldPrefix($prefix, $language_id) {
  return $prefix . SEARCH_API_SOLR_MULTILINGUAL_LANGUAGE_SEPARATOR . $language_id . '_';
}