Change Labels of Widgets (nb_visits)

Hello, I just embeded one of the widgets (Dailiy Visitors) on my site but now I have a problem.

The label of the widget is “nb_visits” which does not give much information about the statistc. Is there a way to change this label to something else like “Daily Visitors”?

[quote=Askur @ Jun 10 2009, 02:45 PM]Hello, I just embeded one of the widgets (Dailiy Visitors) on my site but now I have a problem.

The label of the widget is “nb_visits” which does not give much information about the statistc. Is there a way to change this label to something else like “Daily Visitors”?[/quote]

Hi Askur,
We had the same problem. We moved to the newer version of piwik (0.4.1) and the problem went away.
The place where the translation is mentioned is core/Controller.php ($standardColumnNameToTranslation). you might want to add your “Daily Visitors” translation to this array of translations.
Also remember to put the correct key for the translation in your $dataTable in your plugin’s API/Controller.
Something like this…
$subTable = new Piwik_DataTable_Simple();
$subTable-> addRowsFromArray(array(‘dailyVisitors’=>$row[‘nb_visits’]));
$dataTable->addTable($subTable, \value\); \value here may be your visit_date.

Hope this helps. Let me know how it goes.
Regards,
Raj