Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When you adjust the $links['forward']['name'] = t('New name'); with the help of hook_service_links_alter(&$links);
the links are cached in service_links_get_links(), meaning you lose the user language.
// Retrieve the links from the cache.
if (!$reset && ($cache = cache_get('service_links_get_links')) && !empty($cache->data)) {
$links = $cache->data;
}
Comment | File | Size | Author |
---|---|---|---|
#6 | 2639176-6.patch | 1.05 KB | SpadXIII |
Comments
Comment #2
StefanPr CreditAttribution: StefanPr at ezCompany commentedComment #3
StefanPr CreditAttribution: StefanPr at iO commentedComment #4
SpadXIII CreditAttribution: SpadXIII at ezCompany commentedQuick patch to add the current language to the cache id.
Comment #5
SpadXIII CreditAttribution: SpadXIII at ezCompany commentedComment #6
SpadXIII CreditAttribution: SpadXIII at ezCompany commentedAdded a _ to the cache id.