Sky seems to default to English for Views Pager text - "Next" "Last" etc.

Could someone please point me to a way to modify this - I would like to see these in German.

Comments

jacine’s picture

Status: Active » Closed (fixed)

Hi,

Sky overrides theme_pager(), but only for markup changes. If you look at lines 148-151 of functions/theme-overrides.inc you'll see that nothing has been changed from the way core does it, and the strings are running through t() so they should be translatable.

  $li_first = theme('pager_first', (isset($tags[0]) ? $tags[0] : t('« First')), $limit, $element, $parameters);
  $li_previous = theme('pager_previous', (isset($tags[1]) ? $tags[1] : t('‹ Previous')), $limit, $element, 1, $parameters);
  $li_next = theme('pager_next', (isset($tags[3]) ? $tags[3] : t('Next ›')), $limit, $element, 1, $parameters);
  $li_last = theme('pager_last', (isset($tags[4]) ? $tags[4] : t('Last »')), $limit, $element, $parameters);
.zLaW’s picture

Hi Jacine,

Sorry about the very late reply, but I was off radar the last while.

These lines do not translate, the reason being the « etc. symbols inside of the t().

The fix:

  $li_first = theme('pager_first', (isset($tags[0]) ? $tags[0] : '« ' . t('First')), $limit, $element, $parameters);
  $li_previous = theme('pager_previous', (isset($tags[1]) ? $tags[1] : '‹ ' . t('Previous')), $limit, $element, 1, $parameters);
  $li_next = theme('pager_next', (isset($tags[3]) ? $tags[3] : t('Next') . ' ›'), $limit, $element, 1, $parameters);
  $li_last = theme('pager_last', (isset($tags[4]) ? $tags[4] : t('Last') . ' »'), $limit, $element, $parameters);

Thanks for the great theme!