Go to 'admin/config/search/sitemap' and enter a new title "Sitemap" in "Page Title" field. Then I go to www.mywebsite/com/de/sitemap. After that I go to 'admin/config/regional/translate/translate' page to search for newly added string in 'Page Title' field which is 'Sitemap'. But I didn't find that.

Can someone please provide that functionality?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pankajsachdeva created an issue. See original summary.

pankajsachdeva’s picture

pankajsachdeva’s picture

Issue summary: View changes
pankajsachdeva’s picture

I found the code from where we can make custom page title translatable:

function _site_map_title($default = NULL) {
  // If there's a variable set, overriding the translatable title, use it.
  // Otherwise, use the built-in one or one of its translations.
  $var = variable_get('site_map_page_title', '');
  return (strlen($var)) ? $var : t('Site map');
}

I added t() function for this:

function _site_map_title($default = NULL) {
  // If there's a variable set, overriding the translatable title, use it.
  // Otherwise, use the built-in one or one of its translations.
  $var = variable_get('site_map_page_title', '');
  return (strlen($var)) ? t($var) : t('Site map');
}
renatog’s picture

Assigned: Unassigned » renatog
Status: Active » Reviewed & tested by the community
Issue tags: +ciandt-contrib

Hi @pankajsachdeva.

Thank you very much. Makes sense.

  • RenatoG committed 47454c4 on 7.x-1.x authored by pankajsachdeva
    Issue #2851413 by pankajsachdeva, RenatoG: Custom Sitemap page title is...
renatog’s picture

Status: Reviewed & tested by the community » Fixed

Fixed.

Committed in dev branch.

Thank you very much for contribution.

Good Morning and Good Work.

Regards.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.