You are here

public function CurrentSearchItem::translate in Facet API 6.3

Same name and namespace in other branches
  1. 7.2 contrib/current_search/plugins/current_search/item.inc \CurrentSearchItem::translate()
  2. 7 contrib/current_search/plugins/current_search/item.inc \CurrentSearchItem::translate()

Helper function for translating strings.

Parameters

string $key: The array key of the element being translated.

string $string: The string being translated.

Return value

The translated string.

See also

facetapi_translate_string()

3 calls to CurrentSearchItem::translate()
CurrentSearchGroup::execute in contrib/current_search/plugins/current_search/item_group.inc
Implements CurrentSearchItem::execute().
CurrentSearchItemActive::execute in contrib/current_search/plugins/current_search/item_active.inc
Implements CurrentSearchItem::execute().
CurrentSearchItemText::execute in contrib/current_search/plugins/current_search/item_text.inc
Implements CurrentSearchItem::execute().

File

contrib/current_search/plugins/current_search/item.inc, line 98
Current search plugin base class.

Class

CurrentSearchItem
Base class for current search item plugins.

Code

public function translate($key, $string) {
  $name = 'current_search:' . $this->configName . ':' . $this->name . ':' . $key;
  return facetapi_translate_string($name, $string);
}