Wrap "of" in a t function

s.Daniel - May 29, 2008 - 19:51
Project:Custom Pagers
Version:5.x-1.9
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

In "1 of 2" the "of" is hardcoded in the custom_pagers.module

I couldn't figure out how to quickly create a patch so here is the stuff that needs to be replaced:
Line 521

< 'title' => ($nav_array['current_index'] + 1) .' of '. count($nav_array['full_list']),
---
> 'title' => ($nav_array['current_index'] + 1) . t(' of ') . count($nav_array['full_list']),

#1

joachim - March 3, 2009 - 14:03

It might be best to wrap the whole phrase in a t.
I can't think of any examples but there may well be languages where "4 of 5" needs extra words either side or something...

 
 

Drupal is a registered trademark of Dries Buytaert.