You are here

function hook_facetapi_translate_string in Facet API 7

Same name and namespace in other branches
  1. 6.3 facetapi.api.php \hook_facetapi_translate_string()
  2. 7.2 facetapi.api.php \hook_facetapi_translate_string()

Implemented by the translator module to translate a string.

This hook is invoked by the facetapi_translate_string() function. The "facetapi:translator_module" variable stores which translator module is active since it wouldn't make sense to have multiple translator modules.

Parameters

$name: The name of the string in "textgroup:object_type:object_key:property_name" format.

$string: The string being translated.

$langcode: The language code to translate to a language other than what is used to display the page. Defaults to NULL, which uses the current language.

Return value

The translated string.

See also

facetapi_translate_string()

1 function implements hook_facetapi_translate_string()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

facetapi_test_facetapi_translate_string in tests/facetapi_test.module
Implements hook_facetapi_translate_string().

File

./facetapi.api.php, line 565
Hooks provided by the Facet API module.

Code

function hook_facetapi_translate_string($name, $string, $langcode = NULL) {

  // In this instance, the translator module integrates with the i18n project.
  return i18n_string($name, $string, array(
    'langcode' => $langcode,
  ));
}